Skip to content

Commit e2da16a

Browse files
authored
rattler-build: 0.33.1 -> 0.34.1 (#373448)
2 parents feaf0eb + 8577150 commit e2da16a

File tree

1 file changed

+34
-12
lines changed

1 file changed

+34
-12
lines changed
Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,73 @@
11
{
22
lib,
3+
stdenv,
34
fetchFromGitHub,
45
rustPlatform,
5-
versionCheckHook,
66

77
openssl,
88
pkg-config,
9+
installShellFiles,
10+
buildPackages,
11+
versionCheckHook,
12+
nix-update-script,
913
}:
1014

1115
rustPlatform.buildRustPackage rec {
1216
pname = "rattler-build";
13-
version = "0.33.1";
17+
version = "0.34.1";
1418

1519
src = fetchFromGitHub {
1620
owner = "prefix-dev";
1721
repo = "rattler-build";
18-
rev = "refs/tags/v${version}";
19-
hash = "sha256-yceScRfZuMVnNVNVg3Xs+jU3spdFn0hPMmwMLaYzkNE=";
22+
tag = "v${version}";
23+
hash = "sha256-HDRQveWOJKGBWxN7ZyIECo1HBfz+vSaLW7ueSok+d64=";
2024
};
2125

2226
useFetchCargoVendor = true;
23-
cargoHash = "sha256-eJH7a+9asSPDv0gBwvLc4zssJGCY2jAfVKKOWb3oQ/Q=";
27+
cargoHash = "sha256-b44bL/xVUwBdqwr/jawZbyV+yHsGR3hREm4nvHDMCWA=";
2428

2529
doCheck = false; # test requires network access
2630

31+
buildInputs = [
32+
openssl
33+
];
34+
2735
nativeBuildInputs = [
2836
pkg-config
37+
installShellFiles
2938
];
3039

31-
buildInputs = [
32-
openssl
33-
];
40+
cargoBuildFlags = [ "--bin rattler-build" ]; # other bin like `generate-cli-docs` shouldn't be distributed.
3441

35-
doInstallCheck = true;
42+
postInstall = lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) (
43+
let
44+
emulator = stdenv.hostPlatform.emulator buildPackages;
45+
in
46+
''
47+
installShellCompletion --cmd rattler-build \
48+
--bash <(${emulator} $out/bin/rattler-build completion --shell bash) \
49+
--fish <(${emulator} $out/bin/rattler-build completion --shell fish) \
50+
--zsh <(${emulator} $out/bin/rattler-build completion --shell zsh)
51+
''
52+
);
3653

54+
doInstallCheck = true;
3755
nativeInstallCheckInputs = [
3856
versionCheckHook
3957
];
58+
versionCheckProgramArg = [ "--version" ];
4059

41-
versionCheckProgramArg = [ "-V" ];
60+
passthru.updateScript = nix-update-script { };
4261

4362
meta = {
4463
description = "Universal package builder for Windows, macOS and Linux";
45-
homepage = "https://github.com/prefix-dev/rattler-build";
64+
homepage = "https://rattler.build/";
4665
changelog = "https://github.com/prefix-dev/rattler-build/releases/tag/v${version}";
4766
license = lib.licenses.bsd3;
48-
maintainers = with lib.maintainers; [ genga898 ];
67+
maintainers = with lib.maintainers; [
68+
genga898
69+
xiaoxiangmoe
70+
];
4971
mainProgram = "rattler-build";
5072
};
5173
}

0 commit comments

Comments
 (0)