gnu: trash-cli: Use G-expressions.
* gnu/packages/shellutils.scm (trash-cli)[arguments]: Use G-expressions. Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
parent
cfeb51a6de
commit
024a98cb83
@ -382,32 +382,31 @@ between various shells or commands.")
|
|||||||
"0hkn0hmwrag56g447ddqapib0s399a6b4a9wlliif6zmirxlww9n"))))
|
"0hkn0hmwrag56g447ddqapib0s399a6b4a9wlliif6zmirxlww9n"))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
(list #:phases
|
||||||
(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-before 'build 'patch-path-constants
|
(add-before 'build 'patch-path-constants
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let ((libc (assoc-ref inputs "libc"))
|
(let ((libc (search-input-file inputs "lib/libc.so.6"))
|
||||||
(coreutils (assoc-ref inputs "coreutils")))
|
(df #$(file-append coreutils "/bin/df")))
|
||||||
(substitute* "trashcli/list_mount_points.py"
|
(substitute* "trashcli/list_mount_points.py"
|
||||||
(("\"/lib/libc.so.6\".*")
|
(("\"/lib/libc.so.6\".*")
|
||||||
(string-append "\"" libc "/lib/libc.so.6\"\n"))
|
(string-append "\"" libc "\"\n"))
|
||||||
(("\"df\"")
|
(("\"df\"")
|
||||||
(string-append "\"" coreutils "/bin/df\""))))))
|
(string-append "\"" df "\""))))))
|
||||||
(add-before 'build 'fix-setup.py
|
(add-before 'build 'fix-setup.py
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let ((bin (string-append #$output "/bin")))
|
||||||
(bin (string-append out "/bin")))
|
(mkdir-p bin)
|
||||||
(mkdir-p bin)
|
(substitute* "setup.py"
|
||||||
(substitute* "setup.py"
|
(("add_script\\('")
|
||||||
(("add_script\\('")
|
(string-append "add_script('" bin "/" ))))))
|
||||||
(string-append "add_script('" bin "/" ))))))
|
;; Whenever setup.py is invoked, scripts in out/bin/ are
|
||||||
;; Whenever setup.py is invoked, scripts in out/bin/ are
|
;; replaced. Thus we cannot invoke setup.py for testing.
|
||||||
;; replaced. Thus we cannot invoke setup.py for testing.
|
;; Upstream also uses pytest.
|
||||||
;; Upstream also uses pytest.
|
(replace 'check
|
||||||
(replace 'check
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
(when tests?
|
||||||
(when tests?
|
(invoke "pytest")))))))
|
||||||
(invoke "pytest")))))))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list python-pytest
|
(list python-pytest
|
||||||
python-parameterized
|
python-parameterized
|
||||||
|
Loading…
Reference in New Issue
Block a user