From 8c8661f0ec0812e4c2fcd9935e390bcd0eae5e31 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 21 Apr 2024 01:21:57 +0200 Subject: garage-k2v-client: init at 0.0.4 --- pkgs/simple/garage-k2v-client.nix | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 pkgs/simple/garage-k2v-client.nix (limited to 'pkgs/simple') 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" ]; +} -- cgit v1.2.3