summary refs log tree commit diff
path: root/pkgs/tools/filesystems/garage/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/filesystems/garage/default.nix')
-rw-r--r--pkgs/tools/filesystems/garage/default.nix67
1 files changed, 40 insertions, 27 deletions
diff --git a/pkgs/tools/filesystems/garage/default.nix b/pkgs/tools/filesystems/garage/default.nix
index 4accc34b624..fe72905d0fb 100644
--- a/pkgs/tools/filesystems/garage/default.nix
+++ b/pkgs/tools/filesystems/garage/default.nix
@@ -1,5 +1,16 @@
-{ lib, stdenv, rustPlatform, fetchFromGitea, openssl, pkg-config, protobuf
-, cacert, Security, garage, nixosTests }:
+{ lib
+, stdenv
+, rustPlatform
+, fetchFromGitea
+, fetchpatch
+, openssl
+, pkg-config
+, protobuf
+, cacert
+, Security
+, garage
+, nixosTests
+}:
 let
   generic = { version, sha256, cargoSha256, eol ? false, broken ? false }: rustPlatform.buildRustPackage {
     pname = "garage";
@@ -31,8 +42,6 @@ let
     # on version changes for checking if changes are required here
     buildFeatures = [
       "kubernetes-discovery"
-    ] ++
-    (lib.optionals (lib.versionAtLeast version "0.8") [
       "bundled-libs"
       "sled"
       "metrics"
@@ -41,7 +50,7 @@ let
       "lmdb"
       "sqlite"
       "consul-discovery"
-    ]);
+    ];
 
     # To make integration tests pass, we include the optional k2v feature here,
     # but in buildFeatures only for version 0.8+, where it's enabled by default.
@@ -49,13 +58,11 @@ let
     checkFeatures = [
       "k2v"
       "kubernetes-discovery"
-    ] ++
-    (lib.optionals (lib.versionAtLeast version "0.8") [
       "bundled-libs"
       "sled"
       "lmdb"
       "sqlite"
-    ]);
+    ];
 
     passthru.tests = nixosTests.garage;
 
@@ -69,27 +76,33 @@ let
     };
   };
 in
-  rec {
-    # Until Garage hits 1.0, 0.7.3 is equivalent to 7.3.0 for now, therefore
-    # we have to keep all the numbers in the version to handle major/minor/patch level.
-    # for <1.0.
+rec {
+  # Until Garage hits 1.0, 0.7.3 is equivalent to 7.3.0 for now, therefore
+  # we have to keep all the numbers in the version to handle major/minor/patch level.
+  # for <1.0.
 
-    garage_0_7_3 = generic {
-      version = "0.7.3";
-      sha256 = "sha256-WDhe2L+NalMoIy2rhfmv8KCNDMkcqBC9ezEKKocihJg=";
-      cargoSha256 = "sha256-5m4c8/upBYN8nuysDhGKEnNVJjEGC+yLrraicrAQOfI=";
-      eol = true; # Confirmed with upstream maintainers over Matrix.
-    };
+  garage_0_8_4 = generic {
+    version = "0.8.4";
+    sha256 = "sha256-YgMw41ofM59h7OnHK1H8+Se5mZEdYypPIdkqbyX9qfs=";
+    cargoSha256 = "sha256-dEtksOVqy5wAPoqCuXJj3c4TB6UbR8PTaB70fbL6iR8=";
+  };
 
-    garage_0_7 = garage_0_7_3;
+  garage_0_8 = garage_0_8_4;
 
-    garage_0_8_4 = generic {
-      version = "0.8.4";
-      sha256 = "sha256-YgMw41ofM59h7OnHK1H8+Se5mZEdYypPIdkqbyX9qfs=";
-      cargoSha256 = "sha256-dEtksOVqy5wAPoqCuXJj3c4TB6UbR8PTaB70fbL6iR8=";
-    };
+  garage_0_9_0 = (generic {
+    version = "0.9.0";
+    sha256 = "sha256-Bw7ohMAfnbkhl43k8KxYu2OJd5689PqDS0vAcgU09W8=";
+    cargoSha256 = "sha256-JqCt/8p24suQMRzEyTE2OkbzZCGUDLuGq32kCq3eZ7o=";
+  }).overrideAttrs (oldAttrs: {
+    patches = oldAttrs.patches or [ ] ++ [
+      (fetchpatch {
+        url = "https://git.deuxfleurs.fr/Deuxfleurs/garage/commit/c7f5dcd953ff1fdfa002a8bccfb43eafcc6fddd4.patch";
+        sha256 = "sha256-q7E6gtPjnj5O/K837LMP6LPEFcgdkifxRFrYzBuqkk0=";
+      })
+    ];
+  });
 
-    garage_0_8 = garage_0_8_4;
+  garage_0_9 = garage_0_9_0;
 
-    garage = garage_0_8;
-  }
+  garage = garage_0_9;
+}