blob: 6c517b8d0c0ff9d1c225605a7e2f6c58f5d20895 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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" ];
}
|