Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 2.3 kB view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchPypi 5, cargo 6, configobj 7, cython 8, dulwich 9, fastbencode 10, fastimport 11, libiconv 12, merge3 13, patiencediff 14, pyyaml 15, urllib3 16, breezy 17, launchpadlib 18, testtools 19, pythonOlder 20, installShellFiles 21, rustPlatform 22, rustc 23, setuptools-gettext 24, setuptools-rust 25, testers 26}: 27 28buildPythonPackage rec { 29 pname = "breezy"; 30 version = "3.3.3"; 31 format = "pyproject"; 32 33 disabled = pythonOlder "3.5"; 34 35 src = fetchPypi { 36 inherit pname version; 37 hash = "sha256-WrXmxp63uja5lfPIPjPnvh1d/KwrkoOIjh4MYeRwMOc="; 38 }; 39 40 cargoDeps = rustPlatform.importCargoLock { 41 lockFile = ./Cargo.lock; 42 }; 43 44 postPatch = '' 45 ln -s ${./Cargo.lock} Cargo.lock 46 ''; 47 48 nativeBuildInputs = [ 49 cython 50 installShellFiles 51 rustPlatform.cargoSetupHook 52 cargo 53 rustc 54 setuptools-gettext 55 setuptools-rust 56 ]; 57 58 buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; 59 60 propagatedBuildInputs = [ 61 configobj 62 dulwich 63 fastbencode 64 merge3 65 patiencediff 66 pyyaml 67 urllib3 68 ] ++ passthru.optional-dependencies.launchpad 69 ++ passthru.optional-dependencies.fastimport; 70 71 nativeCheckInputs = [ 72 testtools 73 ]; 74 75 # multiple failures on sandbox 76 doCheck = false; 77 78 checkPhase = '' 79 runHook preCheck 80 81 HOME=$TMPDIR $out/bin/brz --no-plugins selftest 82 83 runHook postCheck 84 ''; 85 86 postInstall = '' 87 wrapProgram $out/bin/brz --prefix PYTHONPATH : "$PYTHONPATH" 88 89 # symlink for bazaar compatibility 90 ln -s "$out/bin/brz" "$out/bin/bzr" 91 92 installShellCompletion --cmd brz --bash contrib/bash/brz 93 ''; 94 95 pythonImportsCheck = [ 96 "breezy" 97 "breezy.bzr.rio" 98 ]; 99 100 passthru = { 101 tests.version = testers.testVersion { 102 package = breezy; 103 command = "HOME=$TMPDIR brz --version"; 104 }; 105 optional-dependencies = { 106 launchpad = [ 107 launchpadlib 108 ]; 109 fastimport = [ 110 fastimport 111 ]; 112 }; 113 }; 114 115 meta = with lib; { 116 description = "Friendly distributed version control system"; 117 homepage = "https://www.breezy-vcs.org/"; 118 changelog = "https://github.com/breezy-team/breezy/blob/brz-${version}/doc/en/release-notes/brz-${versions.majorMinor version}.txt"; 119 license = licenses.gpl2Only; 120 maintainers = [ maintainers.marsam ]; 121 mainProgram = "brz"; 122 }; 123}