{ 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" ]; }