2022-03-07 22:24:22 +00:00
|
|
|
|
{
|
2022-03-16 13:40:56 +00:00
|
|
|
|
haskell,
|
|
|
|
|
haskellPackages,
|
2022-03-09 12:15:28 +00:00
|
|
|
|
installShellFiles,
|
2023-05-14 21:10:00 +00:00
|
|
|
|
lib,
|
2022-03-16 13:40:56 +00:00
|
|
|
|
}: let
|
|
|
|
|
inherit (haskell.lib.compose) justStaticExecutables overrideCabal;
|
2023-05-14 21:10:00 +00:00
|
|
|
|
|
2022-03-16 13:40:56 +00:00
|
|
|
|
overrides = {
|
|
|
|
|
passthru.updateScript = ./update.sh;
|
2023-05-14 21:10:00 +00:00
|
|
|
|
|
|
|
|
|
# nom has unit-tests and golden-tests
|
|
|
|
|
# golden-tests call nix and thus can’t be run in a nix build.
|
2022-03-16 13:40:56 +00:00
|
|
|
|
testTarget = "unit-tests";
|
2023-05-14 21:10:00 +00:00
|
|
|
|
|
2022-03-16 13:40:56 +00:00
|
|
|
|
buildTools = [installShellFiles];
|
|
|
|
|
postInstall = ''
|
2022-10-15 13:28:37 +00:00
|
|
|
|
ln -s nom "$out/bin/nom-build"
|
|
|
|
|
ln -s nom "$out/bin/nom-shell"
|
2022-03-16 13:40:56 +00:00
|
|
|
|
chmod a+x $out/bin/nom-build
|
|
|
|
|
installShellCompletion --zsh --name _nom-build completions/completion.zsh
|
|
|
|
|
'';
|
2020-10-09 20:43:10 +00:00
|
|
|
|
};
|
2023-05-14 21:11:42 +00:00
|
|
|
|
raw-pkg = haskellPackages.callPackage ./generated-package.nix {};
|
2022-03-16 13:40:56 +00:00
|
|
|
|
in
|
2023-05-14 21:11:42 +00:00
|
|
|
|
lib.pipe
|
|
|
|
|
raw-pkg
|
2023-03-22 12:46:11 +00:00
|
|
|
|
[
|
|
|
|
|
(overrideCabal overrides)
|
|
|
|
|
justStaticExecutables
|
|
|
|
|
]
|