summaryrefslogtreecommitdiff
path: root/gnu/packages/dlang.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/dlang.scm')
-rw-r--r--gnu/packages/dlang.scm72
1 files changed, 57 insertions, 15 deletions
diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm
index c18fc37b5f6..5da5118be83 100644
--- a/gnu/packages/dlang.scm
+++ b/gnu/packages/dlang.scm
@@ -733,7 +733,7 @@ compiler for the D programming language.")
733(define-public dub 733(define-public dub
734 (package 734 (package
735 (name "dub") 735 (name "dub")
736 (version "1.33.0") 736 (version "1.40.0")
737 (source (origin 737 (source (origin
738 (method git-fetch) 738 (method git-fetch)
739 (uri (git-reference 739 (uri (git-reference
@@ -742,32 +742,74 @@ compiler for the D programming language.")
742 (file-name (git-file-name name version)) 742 (file-name (git-file-name name version))
743 (sha256 743 (sha256
744 (base32 744 (base32
745 "09p3rvsv11f8lgqgxgz2zj0szsw5lzrsc7y7471hswksc7nmmj70")))) 745 "1ism6wziki5lzsnwq2p144pwgjk1rqj0j85xnciaiswz8a2dqais"))))
746 (build-system gnu-build-system) 746 (build-system gnu-build-system) ; not really, uses a custom build script
747 (arguments 747 (arguments
748 (list 748 (list
749 #:tests? #f ; tests try to install packages 749 #:modules
750 `(,@%default-gnu-modules
751 (srfi srfi-26))
750 #:phases 752 #:phases
751 #~(modify-phases %standard-phases 753 #~(modify-phases %standard-phases
752 (delete 'configure) ; no configure script 754 (add-after 'unpack 'patch-tests
755 (lambda _
756 ;; These fail for various reasons. Some try to fetch a package
757 ;; from code.dlang.org. Some try to clone a git repo. Some try to
758 ;; run /bin/sh.
759 (for-each delete-file-recursively
760 '("test/dpath-variable"
761 "test/dub-as-a-library-cwd"
762 "test/git-dependency"
763 "test/issue502-root-import"
764 "test/issue1408-inherit-linker-files"
765 "test/issue1551-var-escaping"
766 "test/issue1775"
767 "test/issue2192-environment-variables"
768 "test/issue2452"
769 "test/issue2698-cimportpaths-broken-with-dmd-ldc"
770 "test/pr2642-cache-db"
771 "test/pr2644-describe-artifact-path"
772 "test/pr2647-build-deep"))))
773 (replace 'configure
774 (lambda _
775 (setenv "CC" #$(cc-for-target))))
753 (replace 'build 776 (replace 'build
754 (lambda _ 777 (lambda _
755 (setenv "CC" #$(cc-for-target)) 778 (invoke "ldmd2" "-run" "build.d")))
756 (setenv "LD" #$(ld-for-target)) 779 (add-after 'build 'prepare-post-build
757 (invoke "./build.d"))) 780 (lambda _
781 (setenv "DC" "ldc2")
782 (setenv "DUB" "bin/dub")
783 ;; Don't store cache in $HOME, we have no home.
784 (setenv "DUB_HOME" "/tmp/dub-test-home")))
785 (add-after 'prepare-post-build 'generate-man
786 (lambda _
787 (setenv "DIFFABLE" "1") ; replaces currentTime with a static one
788 (invoke "bin/dub" "--single" "./scripts/man/gen_man.d")))
789 (replace 'check
790 (lambda* (#:key tests? #:allow-other-keys)
791 (when tests?
792 (invoke "sh" "./test/run-unittest.sh"))))
758 (replace 'install 793 (replace 'install
759 (lambda* (#:key outputs #:allow-other-keys) 794 (lambda* (#:key outputs #:allow-other-keys)
760 (let* ((out (assoc-ref outputs "out")) 795 (let* ((out (assoc-ref outputs "out"))
761 (bin (string-append out "/bin"))) 796 (bin (string-append out "/bin"))
762 (install-file "bin/dub" bin))))))) 797 (man1 (string-append out "/share/man/man1"))
798 (bash-comp (string-append out "/etc/bash_completion.d"))
799 (fish-comp (string-append
800 out "/share/fish/vendor_completions.d"))
801 (zsh-comp (string-append out "/share/zsh/site-functions")))
802 (install-file "bin/dub" bin)
803 (with-directory-excursion "scripts/man"
804 (for-each (cut install-file <> man1)
805 (find-files "." "\\.1$")))
806 (install-file "scripts/bash-completion/dub.bash" bash-comp)
807 (install-file "scripts/fish-completion/dub.fish" fish-comp)
808 (install-file "scripts/zsh-completion/_dub" zsh-comp)))))))
763 (inputs 809 (inputs
764 (list curl)) 810 (list curl))
765 (native-inputs 811 (native-inputs
766 (list d-tools 812 (list ldc))
767 ldc
768 (module-ref (resolve-interface
769 '(gnu packages commencement))
770 'ld-gold-wrapper)))
771 (home-page "https://dub.pm/") 813 (home-page "https://dub.pm/")
772 (synopsis "Package and build manager for D projects") 814 (synopsis "Package and build manager for D projects")
773 (description 815 (description