gnu: windowmaker: Use modify-phases syntax.

* gnu/packages/gnustep.scm (windowmaker)[arguments]: Use modify-phases.
This commit is contained in:
Leo Famulari 2017-03-14 02:14:32 -04:00
parent 8cac5bca12
commit 962cbb24c5
No known key found for this signature in database
GPG Key ID: 2646FA30BACA7F08
1 changed files with 30 additions and 31 deletions

View File

@ -46,37 +46,36 @@
"12p8kljqgx5hnic0zvs5mxwp7kg21sb6qjagb2qw8ydvf5amrgwx")))) "12p8kljqgx5hnic0zvs5mxwp7kg21sb6qjagb2qw8ydvf5amrgwx"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:phases (alist-cons-before '(#:phases
'configure 'pre-configure (modify-phases %standard-phases
(lambda* (#:key outputs #:allow-other-keys) (add-before 'configure 'pre-configure
;; 'wmaker' wants to invoke 'wmaker.inst' the first time, (lambda* (#:key outputs #:allow-other-keys)
;; and the 'wmsetbg', so make sure it uses the right ones. ;; 'wmaker' wants to invoke 'wmaker.inst' the first time,
;; We can't use a wrapper here because that would pollute ;; and the 'wmsetbg', so make sure it uses the right ones.
;; $PATH in the whole session. ;; We can't use a wrapper here because that would pollute
(let* ((out (assoc-ref outputs "out")) ;; $PATH in the whole session.
(bin (string-append out "/bin"))) (let* ((out (assoc-ref outputs "out"))
(substitute* "src/main.c" (bin (string-append out "/bin")))
(("\"wmaker\\.inst") (substitute* "src/main.c"
(string-append "\"" bin "/wmaker.inst"))) (("\"wmaker\\.inst")
(substitute* '("src/defaults.c" "WPrefs.app/Menu.c") (string-append "\"" bin "/wmaker.inst")))
(("\"wmsetbg") (substitute* '("src/defaults.c" "WPrefs.app/Menu.c")
(string-append "\"" bin "/wmsetbg"))) (("\"wmsetbg")
;; Add enough cells to the command character array to (string-append "\"" bin "/wmsetbg")))
;; allow passing our large path to the wmsetbg binary. ;; Add enough cells to the command character array to
;; The path to wmsetbg in Guix requires 67 extra characters. ;; allow passing our large path to the wmsetbg binary.
(substitute* "src/defaults.c" ;; The path to wmsetbg in Guix requires 67 extra characters.
(("len = strlen\\(text\\) \\+ 40;") (substitute* "src/defaults.c"
(string-append "len = strlen(text) + 107;"))))) (("len = strlen\\(text\\) \\+ 40;")
(alist-cons-after (string-append "len = strlen(text) + 107;"))))))
'install 'wrap (add-after 'install 'wrap
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))) (bin (string-append out "/bin")))
;; In turn, 'wmaker.inst' wants to invoke 'wmmenugen' ;; In turn, 'wmaker.inst' wants to invoke 'wmmenugen'
;; etc., so make sure everything is in $PATH. ;; etc., so make sure everything is in $PATH.
(wrap-program (string-append bin "/wmaker.inst") (wrap-program (string-append bin "/wmaker.inst")
`("PATH" ":" prefix (,bin))))) `("PATH" ":" prefix (,bin)))))))))
%standard-phases))))
(inputs (inputs
`(("libxmu" ,libxmu) `(("libxmu" ,libxmu)
("libxft" ,libxft) ("libxft" ,libxft)