mirror of
https://github.com/haskell-nix/hnix-store.git
synced 2024-12-14 10:42:10 +03:00
20 lines
732 B
Nix
20 lines
732 B
Nix
let
|
|
packages = [ "hnix-store-core" "hnix-store-remote" ];
|
|
inherit (import ./. {}) pkgs haskellPackages;
|
|
hslib = pkgs.haskell.lib;
|
|
extract-external-inputs = p:
|
|
builtins.filter (dep: !(builtins.elem dep packages))
|
|
(map (x: x.pname) (hslib.getHaskellBuildInputs haskellPackages.${p}));
|
|
external-inputs = map (x: haskellPackages.${x}) (builtins.concatLists
|
|
(map extract-external-inputs packages));
|
|
package-envs = builtins.listToAttrs (map (p: {
|
|
name = p;
|
|
value = haskellPackages.${p}.env;
|
|
}) packages);
|
|
in (haskellPackages.mkDerivation {
|
|
pname = "hnix-store-core";
|
|
version = "0.0.0.0";
|
|
libraryHaskellDepends = external-inputs;
|
|
license = pkgs.stdenv.lib.licenses.asl20;
|
|
}).env // package-envs
|