2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, stdenv
|
|
|
|
, dbus
|
|
|
|
, sqlite
|
|
|
|
, Security
|
|
|
|
, SystemConfiguration
|
|
|
|
, libiconv
|
2022-04-27 09:35:20 +00:00
|
|
|
, testers
|
2022-03-30 09:31:56 +00:00
|
|
|
, jujutsu
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "jujutsu";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "0.6.1";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "martinvonz";
|
|
|
|
repo = "jj";
|
|
|
|
rev = "v${version}";
|
2022-12-17 10:02:37 +00:00
|
|
|
sha256 = "sha256-ajBL2o5i4UmclL/s9eEVtn/p51/F4gsClmcYBrAZ+1o=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
cargoSha256 = "sha256-RgF2StIMfFzbp0azG4yRPvzrZ4kczWtOWVd+KTTPbRw=";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
# 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 = {
|
2022-04-27 09:35:20 +00:00
|
|
|
version = testers.testVersion {
|
2022-03-30 09:31:56 +00:00
|
|
|
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 ];
|
2022-04-27 09:35:20 +00:00
|
|
|
mainProgram = "jj";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
}
|