1{ lib
2, stdenv
3, fetchFromGitHub
4, rustPlatform
5, libiconv
6, Security
7, pkg-config
8, openssl
9, nix-update-script
10, testers
11, git-workspace
12}:
13
14rustPlatform.buildRustPackage rec {
15 pname = "git-workspace";
16 version = "1.4.0";
17
18 src = fetchFromGitHub {
19 owner = "orf";
20 repo = pname;
21 rev = "v${version}";
22 sha256 = "sha256-9/t2MDZ5bYTuzCYTodeATqk+xqST2aQMr7Z1x5fPIuw=";
23 };
24
25 cargoSha256 = "sha256-/drXVkYgdkFqZJsz2fNx3Ms21xYKQmwLXRJEmKSaikQ=";
26
27 nativeBuildInputs = [ pkg-config ];
28
29 buildInputs = [ openssl ]
30 ++ lib.optionals stdenv.isDarwin [ libiconv Security ];
31
32 passthru = {
33 updateScript = nix-update-script { };
34 tests.version = testers.testVersion { package = git-workspace; };
35 };
36
37 meta = with lib; {
38 description = "Sync personal and work git repositories from multiple providers";
39 homepage = "https://github.com/orf/git-workspace";
40 license = with licenses; [ mit ];
41 maintainers = with maintainers; [ misuzu ];
42 };
43}