1{ lib
2, rustPlatform
3, fetchCrate
4, pkg-config
5, libgit2_1_6
6, libssh2
7, openssl
8, zlib
9, stdenv
10, darwin
11}:
12
13rustPlatform.buildRustPackage rec {
14 pname = "cargo-workspaces";
15 version = "0.2.44";
16
17 src = fetchCrate {
18 inherit pname version;
19 hash = "sha256-5r5XRb/RWHv0Am58VPOxe+QSKn2QT4JZYp5LjTh20KM=";
20 };
21
22 cargoHash = "sha256-p+7CWvspYk1LRO2s8Sstlven/2edNe+JYFQHaDFlGkM=";
23
24 nativeBuildInputs = [
25 pkg-config
26 ];
27
28 buildInputs = [
29 libgit2_1_6
30 libssh2
31 openssl
32 zlib
33 ] ++ lib.optionals stdenv.isDarwin [
34 darwin.apple_sdk.frameworks.Security
35 ];
36
37 env = {
38 LIBSSH2_SYS_USE_PKG_CONFIG = true;
39 };
40
41 meta = with lib; {
42 description = "A tool for managing cargo workspaces and their crates, inspired by lerna";
43 longDescription = ''
44 A tool that optimizes the workflow around cargo workspaces with
45 git and cargo by providing utilities to version, publish, execute
46 commands and more.
47 '';
48 homepage = "https://github.com/pksunkara/cargo-workspaces";
49 changelog = "https://github.com/pksunkara/cargo-workspaces/blob/v${version}/CHANGELOG.md";
50 license = licenses.mit;
51 maintainers = with maintainers; [ figsoda macalinao matthiasbeyer ];
52 mainProgram = "cargo-workspaces";
53 };
54}