about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2022-12-18 10:01:53 +0000
committerGitHub <noreply@github.com>2022-12-18 10:01:53 +0000
commit22801996532436424d67588e0869669bb2133db3 (patch)
tree4001a49f7967e9d4b42710c67b6406bd03811387
parentecca235a5bdf580ec15cde533f5a95266bbc7fb7 (diff)
parent6c3fbca325f6d24504c2c1d5511a3e874617c59c (diff)
Merge pull request #206684 from domenkozar/cachix-1.1
cachix: 1.0.1 -> 1.1
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix3
-rw-r--r--pkgs/development/haskell-modules/configuration-nix.nix27
-rwxr-xr-xpkgs/development/haskell-modules/patches/cachix.patch10
3 files changed, 27 insertions, 13 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index 55bf787c2f416..8267a47ff7e90 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -132,8 +132,7 @@ self: super: {
     postPatch = "sed -i s/home/tmp/ test/Spec.hs";
   }) super.shell-conduit;
 
-  # https://github.com/cachix/cachix/pull/451
-  cachix = appendPatch ./patches/cachix.patch super.cachix;
+  cachix = self.generateOptparseApplicativeCompletions [ "cachix" ] super.cachix;
 
   # https://github.com/froozen/kademlia/issues/2
   kademlia = dontCheck super.kademlia;
diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix
index d37fd3f7e6a56..3815c91edf2c7 100644
--- a/pkgs/development/haskell-modules/configuration-nix.nix
+++ b/pkgs/development/haskell-modules/configuration-nix.nix
@@ -907,7 +907,32 @@ self: super: builtins.intersectAttrs super {
     (overrideCabal { doCheck = pkgs.postgresql.doCheck; })
   ];
 
-  cachix = self.generateOptparseApplicativeCompletions [ "cachix" ] (super.cachix.override { nix = pkgs.nixVersions.nix_2_9; });
+  cachix = overrideCabal (drv: {
+    version = "1.1";
+    src = pkgs.fetchFromGitHub {
+      owner = "cachix";
+      repo = "cachix";
+      rev = "v1.1";
+      sha256 = "sha256-lML+E5RR5Pk2Do85+8Qs7mMVqp7ImlCIqEYjUAS08W4=";
+    };
+    buildDepends = [ self.conduit-zstd ];
+    postUnpack = "sourceRoot=$sourceRoot/cachix";
+    postPatch = ''
+      sed -i 's/1.0.1/1.1/' cachix.cabal
+    '';
+  }) (super.cachix.override { nix = pkgs.nixVersions.nix_2_9; });
+  cachix-api = overrideCabal (drv: {
+    version = "1.1";
+    src = pkgs.fetchFromGitHub {
+      owner = "cachix";
+      repo = "cachix";
+      rev = "v1.1";
+      sha256 = "sha256-lML+E5RR5Pk2Do85+8Qs7mMVqp7ImlCIqEYjUAS08W4=";
+    };
+    buildDepends = [ self.stm-chans ];
+    postUnpack = "sourceRoot=$sourceRoot/cachix-api";
+  }) super.cachix-api;
+
 
   hercules-ci-agent = super.hercules-ci-agent.override { nix = pkgs.nixVersions.nix_2_9; };
   hercules-ci-cnix-expr =
diff --git a/pkgs/development/haskell-modules/patches/cachix.patch b/pkgs/development/haskell-modules/patches/cachix.patch
deleted file mode 100755
index 21f1496933a71..0000000000000
--- a/pkgs/development/haskell-modules/patches/cachix.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/src/Cachix/Client/OptionsParser.hs
-+++ b/src/Cachix/Client/OptionsParser.hs
-@@ -15,7 +15,7 @@
- import qualified Cachix.Client.URI as URI
- import qualified Cachix.Deploy.OptionsParser as DeployOptions
- import Options.Applicative
--import Protolude hiding (toS)
-+import Protolude hiding (option, toS)
- import Protolude.Conv
- import qualified URI.ByteString as URI