1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 openssl,
6 pkg-config,
7 libiconv,
8 rustPlatform,
9 libz,
10}:
11
12rustPlatform.buildRustPackage rec {
13 pname = "gitrs";
14 version = "v0.3.6";
15
16 src = fetchFromGitHub {
17 owner = "mccurdyc";
18 repo = "gitrs";
19 rev = version;
20 hash = "sha256-+43XJroPNWmdUC6FDL84rZWrJm5fzuUXfpDkAMyVQQg=";
21 };
22
23 cargoHash = "sha256-uDDk1wztXdINPSVF6MvDy+lHIClMLp13HZSTpIgLypM=";
24
25 nativeBuildInputs = [
26 pkg-config # for openssl
27 ];
28
29 buildInputs = [
30 openssl.dev
31 ]
32 ++ lib.optionals stdenv.hostPlatform.isDarwin [
33 libiconv
34 libz
35 ];
36
37 meta = with lib; {
38 description = "Simple, opinionated, tool, written in Rust, for declaratively managing Git repos on your machine";
39 homepage = "https://github.com/mccurdyc/gitrs";
40 license = licenses.mit;
41 maintainers = with maintainers; [ mccurdyc ];
42 mainProgram = "gitrs";
43 };
44}