depot/third_party/nixpkgs/pkgs/applications/version-management/jujutsu/default.nix
Default email a66bca1520 Project import generated by Copybara.
GitOrigin-RevId: 40f79f003b6377bd2f4ed4027dde1f8f922995dd
2022-12-17 11:02:37 +01:00

61 lines
1.2 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, stdenv
, dbus
, sqlite
, Security
, SystemConfiguration
, libiconv
, testers
, jujutsu
}:
rustPlatform.buildRustPackage rec {
pname = "jujutsu";
version = "0.6.1";
src = fetchFromGitHub {
owner = "martinvonz";
repo = "jj";
rev = "v${version}";
sha256 = "sha256-ajBL2o5i4UmclL/s9eEVtn/p51/F4gsClmcYBrAZ+1o=";
};
cargoSha256 = "sha256-RgF2StIMfFzbp0azG4yRPvzrZ4kczWtOWVd+KTTPbRw=";
# Needed to get openssl-sys to use pkg-config.
OPENSSL_NO_VENDOR = 1;
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
dbus
sqlite
] ++ lib.optionals stdenv.isDarwin [
Security
SystemConfiguration
libiconv
];
passthru.tests = {
version = testers.testVersion {
package = jujutsu;
command = "jj --version";
};
};
meta = with lib; {
description = "A Git-compatible DVCS that is both simple and powerful";
homepage = "https://github.com/martinvonz/jj";
changelog = "https://github.com/martinvonz/jj/blob/v${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ _0x4A6F ];
mainProgram = "jj";
};
}