diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml index 35ee3037d07..9557d25e272 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml @@ -2659,6 +2659,9 @@ package-maintainers: - Agda roberth: - arion-compose + - hercules-ci-agent + - hercules-ci-api-core + - hercules-ci-api-agent cdepillabout: - pretty-simple - spago diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 9f1bdb14793..342ae157d30 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -96,6 +96,7 @@ self: super: builtins.intersectAttrs super { # profiling is disabled to allow C++/C mess to work, which is fixed in GHC 8.8 cachix = disableLibraryProfiling super.cachix; + hercules-ci-agent = disableLibraryProfiling super.hercules-ci-agent; # avoid compiling twice by providing executable as a separate output (with small closure size) niv = enableSeparateBinOutput super.niv; diff --git a/pkgs/development/tools/continuous-integration/hercules-ci-agent/default.nix b/pkgs/development/tools/continuous-integration/hercules-ci-agent/default.nix new file mode 100644 index 00000000000..c8316f4bb57 --- /dev/null +++ b/pkgs/development/tools/continuous-integration/hercules-ci-agent/default.nix @@ -0,0 +1,21 @@ +{ gnutar, gzip, git, haskell, haskellPackages, lib, makeWrapper }: +let + inherit (haskell.lib) overrideCabal addBuildDepends; + inherit (lib) makeBinPath; + pkg = + # justStaticExecutables is needed due to https://github.com/NixOS/nix/issues/2990 + overrideCabal + (addBuildDepends (haskell.lib.justStaticExecutables haskellPackages.hercules-ci-agent) [ makeWrapper ]) + (o: { + postInstall = '' + ${o.postInstall or ""} + mkdir -p $out/libexec + mv $out/bin/hercules-ci-agent $out/libexec + makeWrapper $out/libexec/hercules-ci-agent $out/bin/hercules-ci-agent --prefix PATH : ${makeBinPath [ gnutar gzip git ]} + ''; + }); +in pkg // { + meta = pkg.meta // { + position = toString ./default.nix + ":1"; + }; + } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 39f7770a4da..0beea93c485 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11411,6 +11411,8 @@ in # justStaticExecutables is needed due to https://github.com/NixOS/nix/issues/2990 cachix = haskell.lib.justStaticExecutables haskellPackages.cachix; + hercules-ci-agent = callPackage ../development/tools/continuous-integration/hercules-ci-agent { }; + niv = haskellPackages.niv.bin; ormolu = haskellPackages.ormolu.bin;