diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2021-02-05 14:39:15 +0100 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2021-02-05 14:40:19 +0100 |
commit | ff84f41a28346dcf686f78ecac84c8a3a49f3856 (patch) | |
tree | 8d63c4b9cbf18823c6c504867fed2da862bd107f /gnu | |
parent | 6c0430f07a7e01ad695d7648f56e8f08307c1fff (diff) | |
download | guix-patches-ff84f41a28346dcf686f78ecac84c8a3a49f3856.tar guix-patches-ff84f41a28346dcf686f78ecac84c8a3a49f3856.tar.gz |
gnu: python2-argcomplete: Fix build.
* gnu/packages/python-xyz.scm (python2-argcomplete)[arguments]: Add phase to
set HOME variable.
[native-inputs]: Add python2-importlib-metadata.
(python-argcomplete)[properties]: Record python2-variant.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/python-xyz.scm | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index a33aa4962f..0d6ab9debb 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -14637,10 +14637,23 @@ of arguments and options for Python scripts using @code{argparse}. It's particularly useful for programs with many options or sub-parsers that can dynamically suggest completions; for example, when browsing resources over the network.") - (license license:asl2.0))) + (license license:asl2.0) + (properties `((python2-variant . ,(delay python2-argcomplete)))))) (define-public python2-argcomplete - (package-with-python2 python-argcomplete)) + (let ((variant (package-with-python2 + (strip-python2-variant python-argcomplete)))) + (package + (inherit variant) + (arguments + (substitute-keyword-arguments (package-arguments variant) + ((#:phases phases '%standard-phases) + `(modify-phases ,phases + (add-after 'unpack 'set-my-HOME + (lambda _ (setenv "HOME" "/tmp"))))))) + (native-inputs + `(("python2-importlib-metadata" ,python2-importlib-metadata) + ,@(package-native-inputs variant)))))) (define-public python-csscompressor (package |