2017-10-09 20:23:18 +00:00
|
|
|
{ nixpkgs ? <nixpkgs>
|
|
|
|
, systems ? [ "x86_64-linux" ]
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs {};
|
|
|
|
in
|
2020-04-01 17:55:02 +00:00
|
|
|
rec {
|
2017-10-09 20:23:18 +00:00
|
|
|
package = pkgs.lib.genAttrs systems (system: (import ./default.nix {
|
|
|
|
inherit pkgs system;
|
|
|
|
noDev = true;
|
|
|
|
}).override {
|
|
|
|
executable = true;
|
|
|
|
});
|
|
|
|
|
|
|
|
dev = pkgs.lib.genAttrs systems (system: (import ./default.nix {
|
|
|
|
inherit pkgs system;
|
|
|
|
}).override (oldAttrs: {
|
2020-03-31 21:16:47 +00:00
|
|
|
buildInputs = [ pkgs.graphviz ];
|
2017-10-09 20:23:18 +00:00
|
|
|
executable = true;
|
|
|
|
postInstall = ''
|
|
|
|
vendor/bin/phpdoc
|
|
|
|
mkdir -p $out/nix-support
|
2020-03-31 21:54:02 +00:00
|
|
|
echo "doc api $out/share/php/composer-svanderburg-composer2nix/doc" >> $out/nix-support/hydra-build-products
|
2017-10-09 20:23:18 +00:00
|
|
|
'';
|
|
|
|
}));
|
2020-03-31 21:08:24 +00:00
|
|
|
|
|
|
|
tests = {
|
|
|
|
dependencies = pkgs.lib.genAttrs systems (system:
|
|
|
|
import ./tests/dependencies {
|
|
|
|
inherit pkgs;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
enduser = pkgs.lib.genAttrs systems (system:
|
|
|
|
import ./tests/enduser {
|
|
|
|
inherit pkgs;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
2020-04-01 17:55:02 +00:00
|
|
|
|
|
|
|
release = pkgs.releaseTools.aggregate {
|
|
|
|
name = "composer2nix";
|
|
|
|
constituents = map (system: builtins.getAttr system package) systems
|
|
|
|
++ map (system: builtins.getAttr system dev) systems
|
|
|
|
++ map (system: builtins.getAttr system tests.dependencies) systems
|
|
|
|
++ map (system: builtins.getAttr system tests.enduser) systems;
|
|
|
|
};
|
2017-10-09 20:23:18 +00:00
|
|
|
}
|