nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, rustPlatform
3, fetchFromGitHub
4, pkg-config
5, libgit2_1_5
6, openssl
7, stdenv
8, curl
9, darwin
10, git
11}:
12
13rustPlatform.buildRustPackage rec {
14 pname = "cargo-release";
15 version = "0.24.10";
16
17 src = fetchFromGitHub {
18 owner = "crate-ci";
19 repo = "cargo-release";
20 rev = "refs/tags/v${version}";
21 hash = "sha256-3kOis5C0XOdp0CCCSZ8PoGtePqW7ozwzSTA9TGe7kAg=";
22 };
23
24 cargoLock = {
25 lockFile = ./Cargo.lock;
26 outputHashes = {
27 "cargo-test-macro-0.1.0" = "sha256-nlFhe1q0D60dljAi6pFNaz+ssju2Ymtx/PNUl5kJmWo=";
28 };
29 };
30
31 nativeBuildInputs = [
32 pkg-config
33 ];
34
35 buildInputs = [
36 libgit2_1_5
37 openssl
38 ] ++ lib.optionals stdenv.isDarwin [
39 curl
40 darwin.apple_sdk.frameworks.Security
41 ];
42
43 nativeCheckInputs = [
44 git
45 ];
46
47 # disable vendored-libgit2 and vendored-openssl
48 buildNoDefaultFeatures = true;
49
50 meta = with lib; {
51 description = ''Cargo subcommand "release": everything about releasing a rust crate'';
52 homepage = "https://github.com/crate-ci/cargo-release";
53 changelog = "https://github.com/crate-ci/cargo-release/blob/v${version}/CHANGELOG.md";
54 license = with licenses; [ asl20 /* or */ mit ];
55 maintainers = with maintainers; [ figsoda gerschtli ];
56 };
57}