2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cargo,
|
|
|
|
configobj,
|
|
|
|
cython,
|
|
|
|
dulwich,
|
|
|
|
fastbencode,
|
|
|
|
fastimport,
|
|
|
|
pygithub,
|
|
|
|
libiconv,
|
|
|
|
merge3,
|
|
|
|
patiencediff,
|
|
|
|
pyyaml,
|
|
|
|
tzlocal,
|
|
|
|
urllib3,
|
|
|
|
breezy,
|
|
|
|
launchpadlib,
|
|
|
|
testtools,
|
|
|
|
pythonOlder,
|
|
|
|
installShellFiles,
|
|
|
|
rustPlatform,
|
|
|
|
rustc,
|
|
|
|
setuptools-gettext,
|
|
|
|
setuptools-rust,
|
|
|
|
testers,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "breezy";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.3.7";
|
2024-02-07 01:22:34 +00:00
|
|
|
pyproject = true;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "breezy-team";
|
|
|
|
repo = "breezy";
|
|
|
|
rev = "brz-${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-NSfMUyx6a/vb1vTNn/fFfNktrFdB2N940m0TR6EhB9k=";
|
2023-03-04 12:14:45 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
cargoDeps = rustPlatform.importCargoLock { lockFile = ./Cargo.lock; };
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
postPatch = ''
|
|
|
|
ln -s ${./Cargo.lock} Cargo.lock
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
installShellFiles
|
|
|
|
rustPlatform.cargoSetupHook
|
2023-05-24 13:37:59 +00:00
|
|
|
cargo
|
|
|
|
rustc
|
2023-03-04 12:14:45 +00:00
|
|
|
setuptools-gettext
|
|
|
|
setuptools-rust
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs =
|
|
|
|
[
|
|
|
|
configobj
|
|
|
|
dulwich
|
|
|
|
fastbencode
|
|
|
|
merge3
|
|
|
|
patiencediff
|
|
|
|
pyyaml
|
|
|
|
tzlocal
|
|
|
|
urllib3
|
|
|
|
]
|
|
|
|
++ passthru.optional-dependencies.launchpad
|
2023-10-19 13:55:26 +00:00
|
|
|
++ passthru.optional-dependencies.fastimport
|
|
|
|
++ passthru.optional-dependencies.github;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ testtools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
# multiple failures on sandbox
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
HOME=$TMPDIR $out/bin/brz --no-plugins selftest
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
2023-03-04 12:14:45 +00:00
|
|
|
wrapProgram $out/bin/brz --prefix PYTHONPATH : "$PYTHONPATH"
|
|
|
|
|
|
|
|
# symlink for bazaar compatibility
|
2020-04-24 23:36:52 +00:00
|
|
|
ln -s "$out/bin/brz" "$out/bin/bzr"
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
installShellCompletion --cmd brz --bash contrib/bash/brz
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"breezy"
|
|
|
|
"breezy.bzr.rio"
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = breezy;
|
|
|
|
command = "HOME=$TMPDIR brz --version";
|
|
|
|
};
|
|
|
|
optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
launchpad = [ launchpadlib ];
|
|
|
|
fastimport = [ fastimport ];
|
|
|
|
github = [ pygithub ];
|
2023-03-04 12:14:45 +00:00
|
|
|
};
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Friendly distributed version control system";
|
|
|
|
homepage = "https://www.breezy-vcs.org/";
|
2024-02-07 01:22:34 +00:00
|
|
|
changelog = "https://github.com/breezy-team/breezy/blob/${src.rev}/doc/en/release-notes/brz-${versions.majorMinor version}.txt";
|
2022-04-27 09:35:20 +00:00
|
|
|
license = licenses.gpl2Only;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = [ ];
|
2023-03-04 12:14:45 +00:00
|
|
|
mainProgram = "brz";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|