summaryrefslogtreecommitdiffstats
path: root/pkgs/simple/garage-k2v-client.nix
blob: d6a7ca4ce22e8a927f4fe65cdc56984379f59979 (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
{ pkgs }:

pkgs.rustPlatform.buildRustPackage {
  pname = "garage-k2v-client";

  version = pkgs.garage.version;
  src = pkgs.garage.src;
  cargoHash = pkgs.garage.cargoHash;

  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"
    "serde/std"
  ];
}