nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 rustPlatform,
6 installShellFiles,
7 pkg-config,
8 perl,
9 openssl,
10}:
11
12rustPlatform.buildRustPackage rec {
13 pname = "release-plz";
14 version = "0.3.153";
15
16 src = fetchFromGitHub {
17 owner = "MarcoIeni";
18 repo = "release-plz";
19 rev = "release-plz-v${version}";
20 hash = "sha256-/1Fuu1v8kNu0BUFNqhzy7Nexob29NDo/vEOWfQSPF88=";
21 };
22
23 cargoHash = "sha256-cosUcBEb/hRcQ0s/1f30917gDQzGmRKmPNJ4/ASAl+4=";
24
25 nativeBuildInputs = [
26 installShellFiles
27 pkg-config
28 perl
29 ];
30
31 buildInputs = [ openssl ];
32
33 buildAndTestSubdir = "crates/release_plz";
34
35 # Tests depend on additional infrastructure to be running locally
36 doCheck = false;
37
38 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
39 installShellCompletion --cmd ${meta.mainProgram} \
40 --bash <($out/bin/${meta.mainProgram} generate-completions bash) \
41 --fish <($out/bin/${meta.mainProgram} generate-completions fish) \
42 --zsh <($out/bin/${meta.mainProgram} generate-completions zsh)
43 '';
44
45 meta = {
46 description = "Publish Rust crates from CI with a Release PR";
47 homepage = "https://release-plz.ieni.dev";
48 changelog = "https://github.com/MarcoIeni/release-plz/blob/release-plz-v${version}/CHANGELOG.md";
49 license = with lib.licenses; [
50 asl20
51 mit
52 ];
53 maintainers = with lib.maintainers; [
54 dannixon
55 chrjabs
56 ];
57 mainProgram = "release-plz";
58 broken = stdenv.hostPlatform.isDarwin;
59 };
60}