Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: switch from numtide/flake-utils to flake-parts #206

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 45 additions & 28 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 26 additions & 32 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
};
}
Loading