1 { crun, haskell, haskellPackages, lib, makeWrapper, stdenv, emptyDirectory }:
3 inherit (haskell.lib.compose) overrideCabal addBuildTools justStaticExecutables appendConfigureFlags;
4 inherit (lib) makeBinPath;
5 bundledBins = lib.optional stdenv.isLinux crun;
13 postInstall = ""; # ignore completions
14 enableSharedExecutables = false;
15 buildTarget = "lib:hercules-ci-agent hercules-ci-agent-unit-tests";
16 configureFlags = o.configureFlags or [ ] ++ [
17 "--bindir=${emptyDirectory}/hercules-ci-built-without-binaries/no-bin"
20 old.hercules-ci-agent;
24 # justStaticExecutables is needed due to https://github.com/NixOS/nix/issues/2990
28 ${o.postInstall or ""}
30 mv $out/bin/hci $out/libexec
31 makeWrapper $out/libexec/hci $out/bin/hci --prefix PATH : ${lib.escapeShellArg (makeBinPath bundledBins)}
34 (addBuildTools [ makeWrapper ] (justStaticExecutables (haskellPackages.hercules-ci-cli.override overrides)));
37 position = toString ./default.nix + ":1";