Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
31 lines
717 B
Nix
31 lines
717 B
Nix
{
|
||
haskell,
|
||
haskellPackages,
|
||
installShellFiles,
|
||
lib,
|
||
}: let
|
||
inherit (haskell.lib.compose) justStaticExecutables overrideCabal;
|
||
|
||
overrides = {
|
||
passthru.updateScript = ./update.sh;
|
||
|
||
# nom has unit-tests and golden-tests
|
||
# golden-tests call nix and thus can’t be run in a nix build.
|
||
testTarget = "unit-tests";
|
||
|
||
buildTools = [installShellFiles];
|
||
postInstall = ''
|
||
ln -s nom "$out/bin/nom-build"
|
||
ln -s nom "$out/bin/nom-shell"
|
||
chmod a+x $out/bin/nom-build
|
||
installShellCompletion completions/*
|
||
'';
|
||
};
|
||
raw-pkg = haskellPackages.callPackage ./generated-package.nix {};
|
||
in
|
||
lib.pipe
|
||
raw-pkg
|
||
[
|
||
(overrideCabal overrides)
|
||
justStaticExecutables
|
||
]
|