biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / version-management / jujutsu / default.nix
blob8b5580650b32cf1b74f74b1804b6d9760f21c3c4
1 { stdenv
2 , lib
3 , fetchFromGitHub
4 , rustPlatform
5 , Security
6 , SystemConfiguration
7 , pkg-config
8 , libiconv
9 , openssl
10 , gzip
11 , libssh2
12 , libgit2
13 , zstd
14 , installShellFiles
15 , nix-update-script
16 , testers
17 , jujutsu
20 rustPlatform.buildRustPackage rec {
21   pname = "jujutsu";
22   version = "0.16.0";
24   src = fetchFromGitHub {
25     owner = "martinvonz";
26     repo = "jj";
27     rev = "v${version}";
28     hash = "sha256-7bMyboF1JG/roFgo3cusYTi7qd2a6W+u1RJHgoBXNL0=";
29   };
31   cargoHash = "sha256-nPBHIUBm4bQLuj93kE8CUfzA34uUyapVjswz9FFCiTk=";
33   cargoBuildFlags = [ "--bin" "jj" ]; # don't install the fake editors
34   useNextest = false; # nextest is the upstream integration framework, but is problematic for test skipping
35   ZSTD_SYS_USE_PKG_CONFIG = "1";    # disable vendored zlib
36   LIBSSH2_SYS_USE_PKG_CONFIG = "1"; # disable vendored libssh2
38   nativeBuildInputs = [
39     gzip
40     installShellFiles
41     pkg-config
42   ];
44   buildInputs = [
45     openssl
46     zstd
47     libgit2
48     libssh2
49   ] ++ lib.optionals stdenv.isDarwin [
50     Security
51     SystemConfiguration
52     libiconv
53   ];
55   postInstall = ''
56     $out/bin/jj util mangen > ./jj.1
57     installManPage ./jj.1
59     installShellCompletion --cmd jj \
60       --bash <($out/bin/jj util completion bash) \
61       --fish <($out/bin/jj util completion fish) \
62       --zsh <($out/bin/jj util completion zsh)
63   '';
65   checkFlags = [
66     # signing tests spin up an ssh-agent and do git checkouts
67     "--skip=test_ssh_signing"
68   ];
70   passthru = {
71     updateScript = nix-update-script { };
72     tests = {
73       version = testers.testVersion {
74         package = jujutsu;
75         command = "jj --version";
76       };
77     };
78   };
80   meta = with lib; {
81     description = "A Git-compatible DVCS that is both simple and powerful";
82     homepage = "https://github.com/martinvonz/jj";
83     changelog = "https://github.com/martinvonz/jj/blob/v${version}/CHANGELOG.md";
84     license = licenses.asl20;
85     maintainers = with maintainers; [ _0x4A6F thoughtpolice ];
86     mainProgram = "jj";
87   };