@ -1,4 +1,5 @@
{ lib , stdenv , fetchurl , python3Packages , makeWrapper
, rustSupport ? stdenv . hostPlatform . isLinux , rustPlatform
, guiSupport ? false , tk ? null
, ApplicationServices
} :
@ -19,11 +20,25 @@ in python3Packages.buildPythonApplication rec {
passthru = { inherit python ; } ; # pass it so that the same version can be used in hg2git
nativeBuildInputs = [ makeWrapper ] ;
cargoDeps = if rustSupport then rustPlatform . fetchCargoTarball {
inherit src ;
name = " ${ pname } - ${ version } " ;
sha256 = " 1 k c 2 g i q v f w s d l 5 f b 0 q m z 9 6 w s 1 g d r s 3 s k f d z v p i i f 2 i 8 f 7 r 4 n q l h d " ;
sourceRoot = " ${ pname } - ${ version } / r u s t " ;
} else null ;
cargoRoot = if rustSupport then " r u s t " else null ;
nativeBuildInputs = [ makeWrapper ]
++ lib . optionals rustSupport ( with rustPlatform ; [
cargoSetupHook
rust . cargo
rust . rustc
] ) ;
buildInputs = [ docutils ]
++ lib . optionals stdenv . isDarwin [ ApplicationServices ] ;
makeFlags = [ " P R E F I X = $ ( o u t ) " ] ;
makeFlags = [ " P R E F I X = $ ( o u t ) " ]
++ lib . optional rustSupport " P U R E = - - r u s t " ;
postInstall = ( lib . optionalString guiSupport ''
mkdir - p $ out/etc/mercurial