23 rustPlatform.buildRustPackage {
27 src = fetchFromGitea {
28 domain = "git.deuxfleurs.fr";
36 # Starting in 0.9.x series, Garage is using mold in local development
37 # and this leaks in this packaging, we remove it to use the default linker.
38 rm .cargo/config.toml || true
41 useFetchCargoVendor = true;
42 inherit cargoHash cargoPatches;
57 OPENSSL_NO_VENDOR = true;
59 # See https://git.deuxfleurs.fr/Deuxfleurs/garage/src/tag/v0.8.2/nix/compile.nix#L192-L198
60 # on version changes for checking if changes are required here
63 "kubernetes-discovery"
66 ++ lib.optional (lib.versionOlder version "1.0") "sled"
76 # To make integration tests pass, we include the optional k2v feature here,
77 # but in buildFeatures only for version 0.8+, where it's enabled by default.
78 # See: https://garagehq.deuxfleurs.fr/documentation/reference-manual/k2v/
82 "kubernetes-discovery"
85 ++ lib.optional (lib.versionOlder version "1.0") "sled"
92 # Upstream told us this test is flakey.
93 "k2v::poll::test_poll_item"
96 passthru.tests = nixosTests.garage;
99 description = "S3-compatible object store for small self-hosted geo-distributed deployments";
100 changelog = "https://git.deuxfleurs.fr/Deuxfleurs/garage/releases/tag/v${version}";
101 homepage = "https://garagehq.deuxfleurs.fr";
102 license = lib.licenses.agpl3Only;
103 maintainers = with lib.maintainers; [
108 knownVulnerabilities = (lib.optional eol "Garage version ${version} is EOL");
110 mainProgram = "garage";
115 # Until Garage hits 1.0, 0.7.3 is equivalent to 7.3.0 for now, therefore
116 # we have to keep all the numbers in the version to handle major/minor/patch level.
118 # Please add new versions to nixos/tests/garage/default.nix as well.
120 garage_0_8_7 = generic {
122 hash = "sha256-2QGbR6YvMQeMxN3n1MMJ5qfBcEJ5hjXARUOfEn+m4Jc=";
123 cargoHash = "sha256-NmeAkm35Su4o5JEn75pZmxhVHh+VMwKwULKY0eCVlYo=";
124 cargoPatches = [ ./update-time-0.8.patch ];
125 broken = stdenv.hostPlatform.isDarwin;
128 garage_0_9_4 = generic {
130 hash = "sha256-2ZaxenwaVGYYUjUJaGgnGpZNQprQV9+Jns2sXM6cowk=";
131 cargoHash = "sha256-ittesFz1GUGipQecsmMA+GEaVoUY+C9DtEvsO0HFNCc=";
132 cargoPatches = [ ./update-time.patch ];
133 broken = stdenv.hostPlatform.isDarwin;
136 garage_1_0_1 = generic {
138 hash = "sha256-f6N2asycN04I6U5XQ5LEAqYu/v5jYZiFCxZ8YQ32XyM=";
139 cargoHash = "sha256-DX20Uv4g8JO3PlRsTbvr8nF4g9aw1/hW0bfQm6zGBd4=";
140 broken = stdenv.hostPlatform.isDarwin;
143 garage_0_8 = garage_0_8_7;
145 garage_0_9 = garage_0_9_4;
147 garage_1_x = garage_1_0_1;