summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2026-02-24 10:47:14 +0100
committerAndreas Enge <andreas@enge.fr>2026-06-13 08:51:33 +0200
commit803bdf89851a60a002cb9eeec77533f5089e4f43 (patch)
tree9698728e70810ce3bb19a3bcd235abeecb063e2b /gnu/packages
parentd3deaca201c278590eb8b126a8c0de7df34f2a95 (diff)
gnu: ghc-7: Drop input labels.
* gnu/packages/haskell.scm (ghc-bootstrap-x86_64-7.8.4, ghc-bootstrap-i386-7.8.4): Rename their file-name to allow an easier identification within builder scripts. (ghc-7)[inputs, native-inputs]: Drop input labels. [arguments]<#:configure-flags>: Use search-input-file rather than labels. <#:phases>: Adapt phases 'unpack-bin, 'unpack-testsuite-and-fix-bins accordingly. Change-Id: Id5c01e910357fd5a05041abb0027c2e43c11bffa Signed-off-by: Andreas Enge <andreas@enge.fr>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/haskell.scm102
1 files changed, 56 insertions, 46 deletions
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index d730a02a085..b1b0a8d895b 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -868,6 +868,7 @@ interactive environment for the functional language Haskell.")
868 (method url-fetch) 868 (method url-fetch)
869 (uri 869 (uri
870 "https://www.haskell.org/ghc/dist/7.8.4/ghc-7.8.4-x86_64-unknown-linux-deb7.tar.xz") 870 "https://www.haskell.org/ghc/dist/7.8.4/ghc-7.8.4-x86_64-unknown-linux-deb7.tar.xz")
871 (file-name "ghc-7.8.4-x86_64-binary.tar.xz")
871 (sha256 872 (sha256
872 (base32 873 (base32
873 "13azsl53xgj20mi1hj9x0xb32vvcvs6cpmvwx6znxhas7blh0bpn")))) 874 "13azsl53xgj20mi1hj9x0xb32vvcvs6cpmvwx6znxhas7blh0bpn"))))
@@ -877,6 +878,7 @@ interactive environment for the functional language Haskell.")
877 (method url-fetch) 878 (method url-fetch)
878 (uri 879 (uri
879 "https://www.haskell.org/ghc/dist/7.8.4/ghc-7.8.4-i386-unknown-linux-deb7.tar.xz") 880 "https://www.haskell.org/ghc/dist/7.8.4/ghc-7.8.4-i386-unknown-linux-deb7.tar.xz")
881 (file-name "ghc-7.8.4-i386-binary.tar.xz")
880 (sha256 882 (sha256
881 (base32 883 (base32
882 "0wj5s435j0zgww70bj1d3f6wvnnpzlxwvwcyh2qv4qjq5z8j64kg")))) 884 "0wj5s435j0zgww70bj1d3f6wvnnpzlxwvwcyh2qv4qjq5z8j64kg"))))
@@ -911,35 +913,33 @@ interactive environment for the functional language Haskell.")
911 (supported-systems '("i686-linux" "x86_64-linux")) 913 (supported-systems '("i686-linux" "x86_64-linux"))
912 (outputs '("out" "doc")) 914 (outputs '("out" "doc"))
913 (inputs 915 (inputs
914 `(("gmp" ,gmp) 916 (list gmp
915 ("ncurses" ,ncurses) 917 ncurses
916 918 ;; Use a LibFFI variant without static trampolines to work around
917 ;; Use a LibFFI variant without static trampolines to work around 919 ;; <https://gitlab.haskell.org/ghc/ghc/-/issues/20051>.
918 ;; <https://gitlab.haskell.org/ghc/ghc/-/issues/20051>. 920 libffi-sans-static-trampolines
919 ("libffi" ,libffi-sans-static-trampolines) 921 (origin
920 922 (method url-fetch)
921 ("ghc-testsuite" 923 (uri (string-append
922 ,(origin 924 "https://www.haskell.org/ghc/dist/"
923 (method url-fetch) 925 version "/" name "-" version "-testsuite.tar.xz"))
924 (uri (string-append 926 (sha256
925 "https://www.haskell.org/ghc/dist/" 927 (base32
926 version "/" name "-" version "-testsuite.tar.xz")) 928 "0fk4xjw1x5lk2ifvgqij06lrbf1vxq9qfix86h9r16c0bilm3hah")))))
927 (sha256
928 (base32
929 "0fk4xjw1x5lk2ifvgqij06lrbf1vxq9qfix86h9r16c0bilm3hah"))))))
930 (native-inputs 929 (native-inputs
931 `(("gcc" ,gcc-13) ; does not compile with gcc-14 and adding 930 (list
932 ; -Wno-error=incompatible-pointer-types 931 ;; XXX: does not compile with gcc-14 and adding
933 ; at the appropriate stages is difficult 932 ;; -Wno-error=incompatible-pointer-types at the appropriate stages
934 ("perl" ,perl) 933 ;; is difficult
935 ("python" ,python-2) ; for tests (fails with python-3) 934 gcc-13
936 ("ghostscript" ,ghostscript) ; for tests 935 perl
937 ("patchelf" ,patchelf) 936 python-2 ; for tests (fails with python-3)
938 ;; GHC is built with GHC. Therefore we need bootstrap binaries. 937 ghostscript ; for tests
939 ("ghc-binary" 938 patchelf
940 ,(if (string-match "x86_64" (or (%current-target-system) (%current-system))) 939 ;; GHC is built with GHC. Therefore we need bootstrap binaries.
941 ghc-bootstrap-x86_64-7.8.4 940 (if (string-match "x86_64" (or (%current-target-system) (%current-system)))
942 ghc-bootstrap-i686-7.8.4)))) 941 ghc-bootstrap-x86_64-7.8.4
942 ghc-bootstrap-i686-7.8.4)))
943 (arguments 943 (arguments
944 (list 944 (list
945 #:test-target "test" 945 #:test-target "test"
@@ -957,16 +957,17 @@ interactive environment for the functional language Haskell.")
957 (srfi srfi-26) 957 (srfi srfi-26)
958 (srfi srfi-1)) 958 (srfi srfi-1))
959 #:configure-flags 959 #:configure-flags
960 #~(list 960 #~(let* ((libgmp.so (search-input-file %build-inputs "lib/libgmp.so"))
961 (string-append "--with-gmp-libraries=" 961 (gmp (dirname (dirname libgmp.so)))
962 (assoc-ref %build-inputs "gmp") "/lib") 962 (libffi.so (search-input-file %build-inputs "lib/libffi.so"))
963 (string-append "--with-gmp-includes=" 963 (ffi (dirname (dirname libffi.so))))
964 (assoc-ref %build-inputs "gmp") "/include") 964 (list
965 "--with-system-libffi" 965 (string-append "--with-gmp-libraries=" gmp "/lib")
966 (string-append "--with-ffi-libraries=" 966 (string-append "--with-gmp-includes=" gmp "/include")
967 (assoc-ref %build-inputs "libffi") "/lib") 967 "--with-system-libffi"
968 (string-append "--with-ffi-includes=" 968 (string-append "--with-ffi-libraries=" ffi "/lib")
969 (assoc-ref %build-inputs "libffi") "/include")) 969 (string-append "--with-ffi-includes=" ffi "/include")))
970
970 ;; FIXME: The user-guide needs dblatex, docbook-xsl and docbook-utils. 971 ;; FIXME: The user-guide needs dblatex, docbook-xsl and docbook-utils.
971 ;; Currently we do not have the last one. 972 ;; Currently we do not have the last one.
972 ;; #:make-flags 973 ;; #:make-flags
@@ -978,14 +979,23 @@ interactive environment for the functional language Haskell.")
978 (string-append ghc-bootstrap-path "/usr" ))) 979 (string-append ghc-bootstrap-path "/usr" )))
979 (modify-phases %standard-phases 980 (modify-phases %standard-phases
980 (add-after 'unpack 'unpack-bin 981 (add-after 'unpack 'unpack-bin
981 (lambda* (#:key inputs outputs #:allow-other-keys) 982 (lambda* (#:key inputs #:allow-other-keys)
982 (mkdir-p ghc-bootstrap-prefix) 983 (let ((ghc-binary-pair (find (lambda (pair)
983 (with-directory-excursion ghc-bootstrap-path 984 (string-suffix? "binary.tar.xz"
984 (invoke "tar" "xvf" (assoc-ref inputs "ghc-binary"))))) 985 (car pair)))
986 inputs)))
987 (mkdir-p ghc-bootstrap-prefix)
988 (with-directory-excursion ghc-bootstrap-path
989 (invoke "tar" "xvf" (and=> ghc-binary-pair cdr))))))
985 (add-after 'unpack-bin 'unpack-testsuite-and-fix-bins 990 (add-after 'unpack-bin 'unpack-testsuite-and-fix-bins
986 (lambda* (#:key inputs outputs #:allow-other-keys) 991 (lambda* (#:key inputs #:allow-other-keys)
987 (with-directory-excursion ".." 992 (let ((ghc-testsuite (find (lambda (pair)
988 (invoke "tar" "xvf" (assoc-ref inputs "ghc-testsuite"))) 993 (string-suffix?
994 "testsuite.tar.xz"
995 (car pair)))
996 inputs)))
997 (with-directory-excursion ".."
998 (invoke "tar" "xvf" (and=> ghc-testsuite cdr))))
989 (substitute* 999 (substitute*
990 (list "testsuite/timeout/Makefile" 1000 (list "testsuite/timeout/Makefile"
991 "testsuite/timeout/timeout.py" 1001 "testsuite/timeout/timeout.py"
@@ -997,7 +1007,7 @@ interactive environment for the functional language Haskell.")
997 (("/bin/sh") (search-input-file inputs "/bin/sh")) 1007 (("/bin/sh") (search-input-file inputs "/bin/sh"))
998 (("/bin/rm") "rm")))) 1008 (("/bin/rm") "rm"))))
999 (add-before 'configure 'install-bin 1009 (add-before 'configure 'install-bin
1000 (lambda* (#:key inputs outputs #:allow-other-keys) 1010 (lambda _
1001 (with-directory-excursion 1011 (with-directory-excursion
1002 (string-append ghc-bootstrap-path "/ghc-7.8.4") 1012 (string-append ghc-bootstrap-path "/ghc-7.8.4")
1003 (invoke "make" "install")))) 1013 (invoke "make" "install"))))