1{ fetchCrate
2, lib
3, rustPlatform
4, pkg-config
5, openssl
6, zlib
7, stdenv
8, darwin
9, libssh2
10, libgit2
11, IOKit
12, Security
13, CoreFoundation
14, AppKit
15, System
16}:
17
18rustPlatform.buildRustPackage rec {
19 pname = "cargo-workspaces";
20 version = "0.2.35";
21
22 src = fetchCrate {
23 inherit pname version;
24 sha256 = "sha256-MHoVeutoMaHHl1uxv52NOuvXsssqDuyfHTuyTqg9y+U=";
25 };
26
27 cargoSha256 = "sha256-wUVNsUx7JS5icjxbz3CV1lNUvuuL+gTL2QzuE+030WU=";
28 verifyCargoDeps = true;
29
30 # needed to get libssh2/libgit2 to link properly
31 LIBGIT2_SYS_USE_PKG_CONFIG = true;
32 LIBSSH2_SYS_USE_PKG_CONFIG = true;
33
34 nativeBuildInputs = [ pkg-config ];
35 buildInputs = [ openssl zlib libssh2 libgit2 ] ++ (
36 lib.optionals stdenv.isDarwin ([ IOKit Security CoreFoundation AppKit ]
37 ++ (lib.optionals stdenv.isAarch64 [ System ]))
38 );
39
40 meta = with lib; {
41 description = "A tool for managing cargo workspaces and their crates, inspired by lerna";
42 longDescription = ''
43 A tool that optimizes the workflow around cargo workspaces with
44 git and cargo by providing utilities to version, publish, execute
45 commands and more.
46 '';
47 homepage = "https://github.com/pksunkara/cargo-workspaces";
48 license = licenses.mit;
49 maintainers = with maintainers; [ macalinao ];
50 };
51}