-
-
Save flatwhatson/8cb2293d92833b6463af8b8f2d44cdbc to your computer and use it in GitHub Desktop.
Guix package definition for trash-d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use-modules (guix packages) | |
(guix build-system dub) | |
(guix git-download) | |
(guix utils) | |
((guix licenses) #:prefix license:) | |
(gnu packages commencement) | |
(gnu packages dlang)) | |
(define dub-fixed | |
(package | |
(inherit dub) | |
(arguments | |
(substitute-keyword-arguments (package-arguments dub) | |
((#:phases phases) | |
`(modify-phases ,phases | |
(add-before 'build 'set-env-cc | |
(lambda _ | |
(setenv "CC" "gcc"))))))) | |
(native-inputs | |
(modify-inputs (package-native-inputs dub) | |
(append ld-gold-wrapper))))) | |
(define dub-latest | |
(package | |
(inherit dub-fixed) | |
(name "dub") | |
(version "1.23.0") | |
(source | |
(origin | |
(method git-fetch) | |
(uri (git-reference | |
(url "https://github.com/dlang/dub") | |
(commit (string-append "v" version)))) | |
(file-name (git-file-name name version)) | |
(sha256 | |
(base32 "06a4whsl1m600k096nwif83n7za3vr7pj1xwapncy5fcad1gmady")))))) | |
(define trash-d | |
(package | |
(name "trash-d") | |
(version "17") | |
(source | |
(origin | |
(method git-fetch) | |
(uri (git-reference | |
(url "https://github.com/rushsteve1/trash-d.git") | |
(commit version))) | |
(file-name (git-file-name name version)) | |
(sha256 (base32 "0i6ck79im7p04m7i22kkiqha6jdq9m63dr7sv3ylb0rnagha26s6")))) | |
(build-system dub-build-system) | |
(arguments | |
`(#:dub ,dub-latest | |
#:phases | |
(modify-phases %standard-phases | |
(add-before 'build 'set-env-cc | |
(lambda _ | |
(setenv "CC" "gcc"))) | |
(add-before 'build 'touch-dub-json | |
(lambda _ | |
(mkdir-p ".dub") | |
(open-output-file ".dub/dub.json"))) | |
(add-before 'build 'patch-build-dub | |
(lambda _ | |
(substitute* "dub.json" | |
(("\"dflags-ldc\": \\[\"-static\"\\]") | |
"\"dflags-ldc\": []"))))))) | |
(native-inputs | |
(list ld-gold-wrapper)) | |
(home-page "https://github.com/rushsteve1/trash-d") | |
(synopsis "A near drop-in replacement for rm that uses the FreeDesktop trash bin.") | |
(description "A near drop-in replacement for rm that uses the FreeDesktop trash bin.") | |
(license license:expat))) | |
trash-d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment