mirror of
https://github.com/haskell-nix/hnix-store.git
synced 2025-01-07 11:51:26 +03:00
overlay.nix: refactor using pipe, add buildFromSdist
This commit is contained in:
parent
f9edde00ca
commit
c9a3f5a929
34
overlay.nix
34
overlay.nix
@ -1,14 +1,32 @@
|
|||||||
pkgs: hlib: helf: huper: {
|
pkgs: hlib: helf: huper:
|
||||||
|
let
|
||||||
|
lib = pkgs.lib;
|
||||||
|
in
|
||||||
|
{
|
||||||
hnix-store-core =
|
hnix-store-core =
|
||||||
helf.callCabal2nix "hnix-store-core" ./hnix-store-core {};
|
lib.pipe
|
||||||
|
(helf.callCabal2nix "hnix-store-core" ./hnix-store-core {})
|
||||||
|
[
|
||||||
|
hlib.compose.buildFromSdist
|
||||||
|
];
|
||||||
hnix-store-remote =
|
hnix-store-remote =
|
||||||
if pkgs.stdenv.isDarwin
|
lib.pipe
|
||||||
then helf.callCabal2nix "hnix-store-remote" ./hnix-store-remote { }
|
# enable -fio-testsuite for Linux systems as
|
||||||
else
|
# it requires linux-namespaces
|
||||||
( helf.callCabal2nixWithOptions "hnix-store-remote" ./hnix-store-remote "-fio-testsuite" { }
|
# NOTE: we cannot use hlib.compose.enableCabalFlag
|
||||||
).overrideAttrs (attrs: {
|
# as the testsuite deps won't get picked up
|
||||||
|
# after cabal2nix step
|
||||||
|
(
|
||||||
|
if pkgs.stdenv.isDarwin
|
||||||
|
then helf.callCabal2nix "hnix-store-remote" ./hnix-store-remote {}
|
||||||
|
else helf.callCabal2nixWithOptions "hnix-store-remote" ./hnix-store-remote "-fio-testsuite" {}
|
||||||
|
)
|
||||||
|
[
|
||||||
|
hlib.compose.buildFromSdist
|
||||||
|
(pkg: pkg.overrideAttrs (attrs: {
|
||||||
buildInputs = attrs.buildInputs ++ [
|
buildInputs = attrs.buildInputs ++ [
|
||||||
pkgs.nix
|
pkgs.nix
|
||||||
];
|
];
|
||||||
});
|
}))
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user