-
Notifications
You must be signed in to change notification settings - Fork 31
/
flake.nix
38 lines (35 loc) · 1.08 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
description = "php-psr";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
composer2nix.url = "github:svanderburg/composer2nix";
composer2nix.flake = false;
gitignore = {
url = "github:hercules-ci/gitignore.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, composer2nix, gitignore }@args:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
php = pkgs.php;
in
rec {
packages = flake-utils.lib.flattenTree rec {
composer2nix = pkgs.callPackage args.composer2nix {};
php-psr = pkgs.callPackage ./default.nix {
inherit php;
inherit (gitignore.lib) gitignoreSource;
inherit (php) buildPecl;
};
default = php-psr;
};
devShells.default = pkgs.mkShell {
inputsFrom = builtins.attrValues self.packages.${system};
buildInputs = [ php.packages.composer ];
};
}
);
}