mirror of
https://github.com/haskell-nix/hnix-store.git
synced 2024-11-28 05:36:24 +03:00
42f56f504f
Split from `-core` so it doesn't depend on quickcheck, generic-arbitrary and quickcheck-instances that could propagate downstrem. Also allows users to defined their own. With all roundtrip property tests. Later this should also absorb test nix-store/daemon harness from `-remote` so it can be reused by others.
43 lines
955 B
Nix
43 lines
955 B
Nix
attrs@{...}:
|
|
let
|
|
inherit (import ./. attrs) pkgs haskellPackages;
|
|
hlib = pkgs.haskell.lib;
|
|
|
|
packages = [
|
|
"hnix-store-core"
|
|
"hnix-store-db"
|
|
"hnix-store-remote"
|
|
"hnix-store-tests"
|
|
];
|
|
extract-external-inputs = p:
|
|
builtins.filter
|
|
(dep: !(builtins.elem dep packages))
|
|
(map
|
|
(x: x.pname)
|
|
(hlib.getHaskellBuildInputs haskellPackages.${p}));
|
|
external-inputs =
|
|
map
|
|
(x: haskellPackages.${x})
|
|
(builtins.concatLists
|
|
(map
|
|
extract-external-inputs
|
|
packages));
|
|
metaPackage =
|
|
haskellPackages.mkDerivation
|
|
{ pname = "hnix-store-shell";
|
|
version = "0.0.0.0";
|
|
libraryHaskellDepends = external-inputs;
|
|
license = pkgs.stdenv.lib.licenses.asl20;};
|
|
|
|
package-envs =
|
|
builtins.listToAttrs
|
|
(map
|
|
(p:
|
|
{ name = p;
|
|
value = haskellPackages.${p}.env;})
|
|
packages);
|
|
|
|
in
|
|
|
|
metaPackage.env // package-envs
|