about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/rust/cargo-release/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/rust/cargo-release/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/rust/cargo-release/default.nix58
1 files changed, 58 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/rust/cargo-release/default.nix b/nixpkgs/pkgs/development/tools/rust/cargo-release/default.nix
new file mode 100644
index 000000000000..31e03dfeaa4e
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/rust/cargo-release/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, pkg-config
+, libgit2
+, openssl
+, stdenv
+, curl
+, darwin
+, git
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "cargo-release";
+  version = "0.25.0";
+
+  src = fetchFromGitHub {
+    owner = "crate-ci";
+    repo = "cargo-release";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-UJdGbuQfvlZHjCKyHCXPDJ5AdUWJCRUS/vNeTKAwyYI=";
+  };
+
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+    outputHashes = {
+      "cargo-test-macro-0.1.0" = "sha256-jXWdCc3wxcF02uL2OyMepJ+DmINAHRYtAUH6L16bCjI=";
+    };
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = [
+    libgit2
+    openssl
+  ] ++ lib.optionals stdenv.isDarwin [
+    curl
+    darwin.apple_sdk.frameworks.SystemConfiguration
+  ];
+
+  nativeCheckInputs = [
+    git
+  ];
+
+  # disable vendored-libgit2 and vendored-openssl
+  buildNoDefaultFeatures = true;
+
+  meta = with lib; {
+    description = ''Cargo subcommand "release": everything about releasing a rust crate'';
+    mainProgram = "cargo-release";
+    homepage = "https://github.com/crate-ci/cargo-release";
+    changelog = "https://github.com/crate-ci/cargo-release/blob/v${version}/CHANGELOG.md";
+    license = with licenses; [ asl20 /* or */ mit ];
+    maintainers = with maintainers; [ figsoda gerschtli ];
+  };
+}