diff --git a/flake.lock b/flake.lock index 52811244..ca8045b7 100644 --- a/flake.lock +++ b/flake.lock @@ -1,28 +1,44 @@ { "nodes": { "flake-compat": { - "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", + "lastModified": 1688025799, + "narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=", + "owner": "nix-community", "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c", "type": "github" }, "original": { - "owner": "edolstra", + "owner": "nix-community", "repo": "flake-compat", "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1706830856, + "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, "nixpkgs": { "locked": { - "lastModified": 1704842529, - "narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=", + "lastModified": 1706701482, + "narHash": "sha256-4FF5l9v2lBgOUWzP3DcntfsXvEuao5FhhQcJ4SbwjFE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "eabe8d3eface69f5bb16c18f8662a702f50c20d5", + "rev": "269ce7215bb5b436546786e8d354d37903e102a8", "type": "github" }, "original": { @@ -32,11 +48,30 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1706550542, + "narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "97b17f32362e475016f942bbdfda4a4a72a8a652", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "flake-compat": "flake-compat", + "flake-parts": "flake-parts", "nixpkgs": "nixpkgs", - "utils": "utils" + "systems": "systems" } }, "systems": { @@ -53,24 +88,6 @@ "repo": "default", "type": "github" } - }, - "utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index c55dac3f..cb873879 100644 --- a/flake.nix +++ b/flake.nix @@ -2,41 +2,35 @@ description = "Repository of Nix expressions for old PHP versions"; inputs = { - # Shim to make flake.nix work with stable Nix. - flake-compat = { - url = "github:edolstra/flake-compat"; - flake = false; - }; - + flake-compat.url = "github:nix-community/flake-compat"; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - - utils.url = "github:numtide/flake-utils"; + systems.url = "github:nix-systems/default"; }; - outputs = { self, flake-compat, nixpkgs, utils }: - # For each supported platform, - utils.lib.eachDefaultSystem (system: - let - # Let’s merge the package set from Nixpkgs with our custom PHP versions. - pkgs = import nixpkgs.outPath { - config = { - allowUnfree = true; - }; - inherit system; - overlays = [ - self.overlays.default - ]; - }; - in rec { - packages = { - inherit (pkgs) php php56 php70 php71 php72 php73 php74 php80 php81 php82 php83; - }; + outputs = inputs@{ self, flake-parts, nixpkgs, systems, ... }: flake-parts.lib.mkFlake { inherit inputs; } { + systems = import systems; + + perSystem = { self', inputs', config, pkgs, system, lib, ... }: { + _module.args.pkgs = import self.inputs.nixpkgs { + inherit system; + overlays = [ + self.overlays.default + ]; + config.allowUnfree = true; + }; - checks = import ./checks.nix { - inherit packages pkgs system; - }; - } - ) // { - overlays.default = import ./pkgs/phps.nix nixpkgs.outPath; + packages = { + inherit (pkgs) php php56 php70 php71 php72 php73 php74 php80 php81 php82 php83; + }; + + checks = import ./checks.nix { + inherit (self') packages; + inherit pkgs system; + }; + }; + + flake = { + overlays.default = import ./pkgs/phps.nix nixpkgs; }; + }; }