diff options
author | Robert Hensing <robert@roberthensing.nl> | 2021-03-07 13:40:17 +0100 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2021-03-09 16:38:20 +0100 |
commit | fdfbd17b70726172bcb3c43d2a1e6d9fbc725865 (patch) | |
tree | bbb329b2add154b9845f70d977cb7456cb7610d1 /pkgs/development | |
parent | c0a3fd18ca2a8be9b45071ae4c7f22dc47cdce9b (diff) |
hci: init at 0.1.0
Diffstat (limited to 'pkgs/development')
4 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 3d2676df1264c..7a3efeaa9e93b 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1533,6 +1533,11 @@ self: super: { ); }; + hercules-ci-cli = generateOptparseApplicativeCompletion "hci" ( + # See hercules-ci-optparse-applicative in non-hackage-packages.nix. + addBuildDepend (unmarkBroken super.hercules-ci-cli) super.hercules-ci-optparse-applicative + ); + # 2020-12-05: http-client is fixed on too old version essence-of-live-coding-warp = super.essence-of-live-coding-warp.override { http-client = self.http-client_0_7_6; diff --git a/pkgs/development/haskell-modules/non-hackage-packages.nix b/pkgs/development/haskell-modules/non-hackage-packages.nix index 4d66478f338d7..86123d8a70f4b 100644 --- a/pkgs/development/haskell-modules/non-hackage-packages.nix +++ b/pkgs/development/haskell-modules/non-hackage-packages.nix @@ -28,4 +28,8 @@ self: super: { graphql-parser = self.callPackage ../misc/haskell/hasura/graphql-parser {}; # cabal2nix --subpath server --maintainer offline --no-check --revision 1.2.1 https://github.com/hasura/graphql-engine.git graphql-engine = self.callPackage ../misc/haskell/hasura/graphql-engine {}; + + # Unofficial fork until PRs are merged https://github.com/pcapriotti/optparse-applicative/pulls/roberth + # cabal2nix --maintainer roberth https://github.com/hercules-ci/optparse-applicative.git > pkgs/development/misc/haskell/hercules-ci-optparse-applicative.nix + hercules-ci-optparse-applicative = self.callPackage ../misc/haskell/hercules-ci-optparse-applicative.nix {}; } diff --git a/pkgs/development/misc/haskell/hercules-ci-optparse-applicative.nix b/pkgs/development/misc/haskell/hercules-ci-optparse-applicative.nix new file mode 100644 index 0000000000000..7f49430c15c3d --- /dev/null +++ b/pkgs/development/misc/haskell/hercules-ci-optparse-applicative.nix @@ -0,0 +1,21 @@ +{ mkDerivation, ansi-wl-pprint, base, fetchgit, lib, process, QuickCheck +, transformers, transformers-compat +}: +mkDerivation { + pname = "hercules-ci-optparse-applicative"; + version = "0.16.1.0"; + src = fetchgit { + url = "https://github.com/hercules-ci/optparse-applicative.git"; + sha256 = "0v0r11jaav95im82if976256kncp0ji7nfdrlpbgmwxnkj1hxl48"; + rev = "f9d1242f9889d2e09ff852db9dc2d231d9a3e8d8"; + fetchSubmodules = true; + }; + libraryHaskellDepends = [ + ansi-wl-pprint base process transformers transformers-compat + ]; + testHaskellDepends = [ base QuickCheck ]; + homepage = "https://github.com/hercules-ci/optparse-applicative"; + description = "Utilities and combinators for parsing command line options (fork)"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ roberth ]; +} diff --git a/pkgs/development/tools/continuous-integration/hci/default.nix b/pkgs/development/tools/continuous-integration/hci/default.nix new file mode 100644 index 0000000000000..dfca0c4d388e5 --- /dev/null +++ b/pkgs/development/tools/continuous-integration/hci/default.nix @@ -0,0 +1,23 @@ +{ haskell, haskellPackages, lib, makeWrapper, runc, stdenv }: +let + inherit (haskell.lib) overrideCabal addBuildDepends; + inherit (lib) makeBinPath; + bundledBins = lib.optional stdenv.isLinux runc; + + pkg = + # justStaticExecutables is needed due to https://github.com/NixOS/nix/issues/2990 + overrideCabal + (addBuildDepends (haskell.lib.justStaticExecutables haskellPackages.hercules-ci-cli) [ makeWrapper ]) + (o: { + postInstall = '' + ${o.postInstall or ""} + mkdir -p $out/libexec + mv $out/bin/hci $out/libexec + makeWrapper $out/libexec/hci $out/bin/hci --prefix PATH : ${makeBinPath bundledBins} + ''; + }); +in pkg // { + meta = pkg.meta // { + position = toString ./default.nix + ":1"; + }; + } |