aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMiguel Ángel Arruga Vivas <rosen644835@gmail.com>2020-11-16 19:06:40 +0100
committerMiguel Ángel Arruga Vivas <rosen644835@gmail.com>2020-11-16 21:48:36 +0100
commit46ce24fb2d8c9f7dce16c4c08919f0fc108dbfae (patch)
tree0625b4d8c2f214ee4f5692d84439a9d8bdbb9c8e /gnu/packages
parent3428c66c5a4d5f1a5fd2f1ad4cd3105993ae8e6d (diff)
downloadguix-46ce24fb2d8c9f7dce16c4c08919f0fc108dbfae.tar
guix-46ce24fb2d8c9f7dce16c4c08919f0fc108dbfae.tar.gz
gnu: git: Add phase to restore hooks shebang.
Fixes <https://bugs.gnu.org/25508>. * gnu/packages/version-control.scm (git)[arguments]: New phase restore-sample-hooks-shebang.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/version-control.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 3e46a6162b..1842528ff6 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -391,6 +391,16 @@ as well as the classic centralized workflow.")
(install-file "contrib/subtree/git-subtree.1"
(string-append subtree "/share/man/man1"))
#t)))
+ (add-after 'install 'restore-sample-hooks-shebang
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (dir (string-append out "/share/git-core/templates/hooks")))
+ (for-each (lambda (file)
+ (format #t "restoring shebang on `~a'~%" file)
+ (substitute* file
+ (("^#!.*/bin/sh") "#!/bin/sh")))
+ (find-files dir ".*"))
+ #t)))
(add-after 'install 'split
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Split the binaries to the various outputs.