diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index c1b3816..e1835d1 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -20,3 +20,6 @@ jobs: uses: ./. with: _internal-strict-mode: true + flake-dirs: | + . + test/subflake diff --git a/test/subflake/flake.lock b/test/subflake/flake.lock new file mode 100644 index 0000000..a5657de --- /dev/null +++ b/test/subflake/flake.lock @@ -0,0 +1,25 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1716330097, + "narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=", + "rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2", + "revCount": 629726, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.629726%2Brev-5710852ba686cc1fd0d3b8e22b3117d43ba374c2/018fa276-eb5e-762d-b67b-85f281987019/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/test/subflake/flake.nix b/test/subflake/flake.nix new file mode 100644 index 0000000..e0c3040 --- /dev/null +++ b/test/subflake/flake.nix @@ -0,0 +1,23 @@ +# Used for testing the flake-dirs parameter +{ + description = "update-flake-lock test sub-flake"; + + inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; + + outputs = { self, nixpkgs }: + let + supportedSystems = [ "x86_64-linux" "aarch64-darwin" "aarch64-linux" "x86_64-darwin" ]; + forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { + pkgs = import nixpkgs { inherit system; }; + }); + in + { + devShells = forEachSupportedSystem ({ pkgs }: { + default = pkgs.mkShell { + packages = with pkgs; [ + ponysay + ]; + }; + }); + }; +}