distro: ncurses: Don't retain a reference to the bootstrap Bash.
* distro/packages/ncurses.scm (ncurses): Remove #:patch-shebangs? argument since it now has no effect. Simplify PATCH-MAKEFILE-PHASE. Add `configure-phase', and use it.
This commit is contained in:
parent
8ba8aeb74d
commit
feddc16c70
1 changed files with 22 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
||||||
;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
|
;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
|
||||||
;;; Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright (C) 2012, 2013 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of Guix.
|
;;; This file is part of Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -26,8 +26,23 @@
|
||||||
(define-public ncurses
|
(define-public ncurses
|
||||||
(let ((patch-makefile-phase
|
(let ((patch-makefile-phase
|
||||||
'(lambda _
|
'(lambda _
|
||||||
(substitute* (find-files "." "Makefile.in")
|
(for-each patch-makefile-SHELL
|
||||||
(("^SHELL[[:blank:]]*=.*$") ""))))
|
(find-files "." "Makefile.in"))))
|
||||||
|
(configure-phase
|
||||||
|
'(lambda* (#:key inputs outputs configure-flags
|
||||||
|
#:allow-other-keys)
|
||||||
|
;; The `ncursesw5-config' has a #!/bin/sh. We want to patch
|
||||||
|
;; it to point to libc's embedded Bash, to avoid retaining a
|
||||||
|
;; reference to the bootstrap Bash.
|
||||||
|
(let* ((libc (assoc-ref inputs "libc"))
|
||||||
|
(bash (string-append libc "/bin/bash"))
|
||||||
|
(out (assoc-ref outputs "out")))
|
||||||
|
(format #t "configure flags: ~s~%" configure-flags)
|
||||||
|
(zero? (apply system* bash "./configure"
|
||||||
|
(string-append "SHELL=" bash)
|
||||||
|
(string-append "CONFIG_SHELL=" bash)
|
||||||
|
(string-append "--prefix=" out)
|
||||||
|
configure-flags)))))
|
||||||
(post-install-phase
|
(post-install-phase
|
||||||
'(lambda* (#:key outputs #:allow-other-keys)
|
'(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
|
@ -90,11 +105,10 @@
|
||||||
(alist-cons-before
|
(alist-cons-before
|
||||||
'configure 'patch-makefile-SHELL
|
'configure 'patch-makefile-SHELL
|
||||||
,patch-makefile-phase
|
,patch-makefile-phase
|
||||||
%standard-phases))
|
(alist-replace
|
||||||
|
'configure
|
||||||
;; The `ncursesw5-config' has a #!/bin/sh that we don't want to
|
,configure-phase
|
||||||
;; patch, to avoid retaining a reference to the build-time Bash.
|
%standard-phases)))))
|
||||||
#:patch-shebangs? #f))
|
|
||||||
((system cross-system)
|
((system cross-system)
|
||||||
(arguments cross-system))))
|
(arguments cross-system))))
|
||||||
(self-native-input? #t)
|
(self-native-input? #t)
|
||||||
|
|
Reference in a new issue