diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-06-07 11:54:03 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-06-07 11:54:03 +0200 |
commit | aeafff536f933b07836b14d089dfc52b0e432ec9 (patch) | |
tree | 4ede554999f98cf9e19c04098c934db52efae795 /gnu/packages/gnuzilla.scm | |
parent | 9dee9e8ffe4650949bd3ad2edf559cf4a33e9e6e (diff) | |
parent | f82c58539e1f7b9b864e68ea2ab0c6a17c15fbb5 (diff) | |
download | guix-aeafff536f933b07836b14d089dfc52b0e432ec9.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/gnuzilla.scm')
-rw-r--r-- | gnu/packages/gnuzilla.scm | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 7e52534b8f..4ffa3ac165 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -448,6 +448,8 @@ standards.") ) #:modules ((ice-9 ftw) + (ice-9 rdelim) + (ice-9 match) ,@%gnu-build-system-modules) #:phases (modify-phases %standard-phases @@ -509,7 +511,48 @@ standards.") (format #t "configure flags: ~s~%" flags) (zero? (apply system* bash (string-append srcdir "/configure") - flags)))))))) + flags))))) + (add-before 'configure 'install-desktop-entry + (lambda* (#:key outputs #:allow-other-keys) + ;; Install the '.desktop' file. + (define (swallow-%%-directives input output) + ;; Interpret '%%ifdef' directives found in the '.desktop' file. + (let loop ((state 'top)) + (match (read-line input 'concat) + ((? eof-object?) + #t) + ((? string? line) + (cond ((string-prefix? "%%ifdef" line) + (loop 'ifdef)) + ((string-prefix? "%%else" line) + (loop 'else)) + ((string-prefix? "%%endif" line) + (loop 'top)) + (else + (case state + ((top else) + (display line output) + (loop state)) + (else + (loop state))))))))) + + (let* ((out (assoc-ref outputs "out")) + (applications (string-append out "/share/applications"))) + (call-with-input-file "debian/icecat.desktop.in" + (lambda (input) + (call-with-output-file "debian/icecat.desktop" + (lambda (output) + (swallow-%%-directives input output))))) + + (substitute* "debian/icecat.desktop" + (("@MOZ_DISPLAY_NAME@") + "GNU IceCat") + (("^Exec=@MOZ_APP_NAME@") + (string-append "Exec=" out "/bin/icecat")) + (("@MOZ_APP_NAME@") + "icecat")) + (install-file "debian/icecat.desktop" applications) + #t)))))) (home-page "http://www.gnu.org/software/gnuzilla/") (synopsis "Entirely free browser derived from Mozilla Firefox") (description |