summaryrefslogtreecommitdiffstats
path: root/pkgs/simple
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2024-04-21 01:21:57 +0200
committertv <tv@krebsco.de>2024-04-21 01:23:06 +0200
commit8c8661f0ec0812e4c2fcd9935e390bcd0eae5e31 (patch)
treef01200aff22a5fcbd84c6fc0593123557dffd573 /pkgs/simple
parent604a41bb3b670dca72ea57068575c47032ce0dc1 (diff)
garage-k2v-client: init at 0.0.4
Diffstat (limited to 'pkgs/simple')
-rw-r--r--pkgs/simple/garage-k2v-client.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/simple/garage-k2v-client.nix b/pkgs/simple/garage-k2v-client.nix
new file mode 100644
index 0000000..6c517b8
--- /dev/null
+++ b/pkgs/simple/garage-k2v-client.nix
@@ -0,0 +1,40 @@
+{ pkgs }:
+
+pkgs.rustPlatform.buildRustPackage {
+ pname = "garage-k2v-client";
+ version = "0.0.4";
+
+ src = pkgs.fetchgit {
+ url = "https://git.deuxfleurs.fr/Deuxfleurs/garage.git";
+ rev = "v1.0.0";
+ hash = "sha256-5W5cXylFCrDup+HOOUVPWBJUSphOp8szgtpvRIv82b8=";
+ };
+
+ cargoHash = "sha256-Ggau8m0FVqpS1vMbpwBSkwBx6/2SrBw3ZpYhrjqkhNs=";
+
+ # Copied from nixpkgs@e402c3e's ./pkgs/tools/filesystems/garage/default.nix
+ postPatch = ''
+ # Starting in 0.9.x series, Garage is using mold in local development
+ # and this leaks in this packaging, we remove it to use the default linker.
+ rm .cargo/config.toml || true
+ '';
+
+ preBuild = ''
+ cd src/k2v-client
+ '';
+
+ postBuild = ''
+ cd -
+ '';
+
+ installPhase = ''
+ mkdir -p $out/bin
+ find target -executable -type f -name k2v-cli -exec cp {} $out/bin/ \;
+ '';
+
+ # Don't check otherwise we cannot cd - in postBuild
+ # (but would have to do it after the tests instead.)
+ doCheck = false;
+
+ buildFeatures = [ "cli" ];
+}