diff --git a/pkgs/build-support/fetchbzr/builder.sh b/pkgs/build-support/fetchbzr/builder.sh index 380642a5e681..991864719a07 100644 --- a/pkgs/build-support/fetchbzr/builder.sh +++ b/pkgs/build-support/fetchbzr/builder.sh @@ -5,4 +5,4 @@ echo "exporting \`$url' (revision $rev) into \`$out'" # Perform a lightweight checkout so that we don't end up importing # all the repository's history. -BZR_LOG=/dev/null bzr -Ossl.cert_reqs=none export -r "$rev" --format=dir "$out" "$url" +XDG_CACHE_HOME="$TMPDIR" BRZ_LOG=/dev/null bzr -Ossl.cert_reqs=none export -r "$rev" --format=dir "$out" "$url" diff --git a/pkgs/development/python-modules/breezy/Cargo.lock b/pkgs/development/python-modules/breezy/Cargo.lock new file mode 100644 index 000000000000..7333bfe40f31 --- /dev/null +++ b/pkgs/development/python-modules/breezy/Cargo.lock @@ -0,0 +1,311 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +dependencies = [ + "memchr", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "breezy" +version = "3.3.2" +dependencies = [ + "pyo3", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "indoc" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47741a8bc60fb26eb8d6e0238bbb26d8575ff623fdc97b1a2c00c050b9684ed8" +dependencies = [ + "indoc-impl", + "proc-macro-hack", +] + +[[package]] +name = "indoc-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce046d161f000fffde5f432a0d034d0341dc152643b2598ed5bfce44c4f3a8f0" +dependencies = [ + "proc-macro-hack", + "proc-macro2", + "quote", + "syn", + "unindent", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.139" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" + +[[package]] +name = "lock_api" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "once_cell" +version = "1.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall", + "smallvec", + "winapi", +] + +[[package]] +name = "paste" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880" +dependencies = [ + "paste-impl", + "proc-macro-hack", +] + +[[package]] +name = "paste-impl" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6" +dependencies = [ + "proc-macro-hack", +] + +[[package]] +name = "proc-macro-hack" +version = "0.5.20+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" + +[[package]] +name = "proc-macro2" +version = "1.0.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "pyo3" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d41d50a7271e08c7c8a54cd24af5d62f73ee3a6f6a314215281ebdec421d5752" +dependencies = [ + "cfg-if", + "indoc", + "libc", + "parking_lot", + "paste", + "pyo3-build-config", + "pyo3-macros", + "unindent", +] + +[[package]] +name = "pyo3-build-config" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "779239fc40b8e18bc8416d3a37d280ca9b9fb04bda54b98037bb6748595c2410" +dependencies = [ + "once_cell", +] + +[[package]] +name = "pyo3-macros" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b247e8c664be87998d8628e86f282c25066165f1f8dda66100c48202fdb93a" +dependencies = [ + "pyo3-macros-backend", + "quote", + "syn", +] + +[[package]] +name = "pyo3-macros-backend" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a8c2812c412e00e641d99eeb79dd478317d981d938aa60325dfa7157b607095" +dependencies = [ + "proc-macro2", + "pyo3-build-config", + "quote", + "syn", +] + +[[package]] +name = "quote" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" + +[[package]] +name = "rio-py" +version = "3.3.2" +dependencies = [ + "lazy_static", + "pyo3", + "regex", +] + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "smallvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicode-ident" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" + +[[package]] +name = "unindent" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/pkgs/development/python-modules/breezy/default.nix b/pkgs/development/python-modules/breezy/default.nix index c8104f1b2376..6d27908dd84f 100644 --- a/pkgs/development/python-modules/breezy/default.nix +++ b/pkgs/development/python-modules/breezy/default.nix @@ -1,57 +1,122 @@ { lib +, stdenv , buildPythonPackage , fetchPypi , configobj -, patiencediff +, cython +, dulwich , fastbencode , fastimport -, dulwich +, libiconv +, merge3 +, patiencediff +, pyyaml +, urllib3 +, breezy , launchpadlib , testtools , pythonOlder , installShellFiles +, rustPlatform +, setuptools-gettext +, setuptools-rust +, testers }: buildPythonPackage rec { pname = "breezy"; - version = "3.2.2"; + version = "3.3.2"; + format = "pyproject"; disabled = pythonOlder "3.5"; src = fetchPypi { inherit pname version; - sha256 = "sha256-GHpuRSCN0F2BdQc2cgyDcQz0gJT1R+xAgcVxJZVZpNU="; + sha256 = "sha256-TqaUn8uwdrl4VFsJn6xoq6011voYmd7vT2uCo9uiV8E="; }; - nativeBuildInputs = [ installShellFiles ]; + cargoDeps = rustPlatform.importCargoLock { + lockFile = ./Cargo.lock; + }; + + postPatch = '' + ln -s ${./Cargo.lock} Cargo.lock + ''; + + cargoHash = "sha256-xYZh/evNp036/wRlNWWUYeD2EkleM+OeY4qbYMCE00I="; + + nativeBuildInputs = [ + cython + installShellFiles + rustPlatform.cargoSetupHook + rustPlatform.rust.cargo + rustPlatform.rust.rustc + setuptools-gettext + setuptools-rust + ]; + + buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; propagatedBuildInputs = [ configobj - fastbencode - patiencediff - fastimport dulwich - launchpadlib + fastbencode + merge3 + patiencediff + pyyaml + urllib3 + ] ++ passthru.optional-dependencies.launchpad + ++ passthru.optional-dependencies.fastimport; + + nativeCheckInputs = [ + testtools ]; - nativeCheckInputs = [ testtools ]; - - # There is a conflict with their `lazy_import` and plugin tests + # multiple failures on sandbox doCheck = false; - # symlink for bazaar compatibility + checkPhase = '' + runHook preCheck + + HOME=$TMPDIR $out/bin/brz --no-plugins selftest + + runHook postCheck + ''; + postInstall = '' + wrapProgram $out/bin/brz --prefix PYTHONPATH : "$PYTHONPATH" + + # symlink for bazaar compatibility ln -s "$out/bin/brz" "$out/bin/bzr" installShellCompletion --cmd brz --bash contrib/bash/brz ''; - pythonImportsCheck = [ "breezy" ]; + pythonImportsCheck = [ + "breezy" + "breezy.bzr.rio" + ]; + + passthru = { + tests.version = testers.testVersion { + package = breezy; + command = "HOME=$TMPDIR brz --version"; + }; + optional-dependencies = { + launchpad = [ + launchpadlib + ]; + fastimport = [ + fastimport + ]; + }; + }; meta = with lib; { description = "Friendly distributed version control system"; homepage = "https://www.breezy-vcs.org/"; license = licenses.gpl2Only; maintainers = [ maintainers.marsam ]; + mainProgram = "brz"; }; } diff --git a/pkgs/development/python-modules/merge3/default.nix b/pkgs/development/python-modules/merge3/default.nix new file mode 100644 index 000000000000..e16a73eee3df --- /dev/null +++ b/pkgs/development/python-modules/merge3/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchPypi +, setuptools +}: + +buildPythonPackage rec { + pname = "merge3"; + version = "0.0.13"; + + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "8abda1d2d49776323d23d09bfdd80d943a57d43d28d6152ffd2c87956a9b6b54"; + }; + + nativeBuildInputs = [ + setuptools + ]; + + pythonImportsCheck = [ + "merge3" + ]; + + meta = with lib; { + description = "Python implementation of 3-way merge"; + homepage = "https://github.com/breezy-team/merge3"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ marsam ]; + }; +} diff --git a/pkgs/development/python-modules/setuptools-gettext/default.nix b/pkgs/development/python-modules/setuptools-gettext/default.nix index f8b5d45bbc7f..882eb6d4599b 100644 --- a/pkgs/development/python-modules/setuptools-gettext/default.nix +++ b/pkgs/development/python-modules/setuptools-gettext/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "setuptools-gettext"; - version = "0.1.1"; + version = "0.1.3"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -16,7 +16,7 @@ buildPythonPackage rec { owner = "breezy-team"; repo = "setuptools-gettext"; rev = "refs/tags/v${version}"; - hash = "sha256-MifsEuWNTEDJa9RfIbM/EDMJg0cmHXX6oJxNskKEbY4="; + hash = "sha256-pTjYdezNBFeLCh6cbC+YtHxQB4zrZAFTCjjNQffbHhc="; }; propagatedBuildInputs = [ diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cef51d98405e..259f5de93347 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5870,6 +5870,8 @@ self: super: with self; { python3Packages = self; }); + merge3 = callPackage ../development/python-modules/merge3 { }; + mergedb = callPackage ../development/python-modules/mergedb { }; mergedeep = callPackage ../development/python-modules/mergedeep { };