GNU bug report logs - #77474
wrap-script: breaks shebang

Previous Next

Package: guix;

Reported by: Daniel Ziltener <dziltener <at> lyrion.ch>

Date: Thu, 3 Apr 2025 01:06:01 UTC

Severity: normal

Merged with 65670

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Ziltener <dziltener <at> lyrion.ch>
To: bug-guix <at> gnu.org
Subject: wrap-script: breaks shebang
Date: Thu, 3 Apr 2025 02:58:36 +0200
"wrap-script" seems to be fully broken. It replaces the shebang with 
`#!#f --no-auto-compile`. The input is a bash script with a Guix bash 
shebang. I found out by writing a package:


```
(define-public hdrop
  (package
   (name "hdrop")
   (version "0.7.7")
   (source
    (origin
     (method git-fetch)
     (uri
      (git-reference
       (url "https://github.com/Schweber/hdrop.git")
       (commit (string-append "v" version))))
     (sha256
      (base32
       "1iwvh0lgmpjpwq6h5fvgdn7rc0pvpywiar8inzwwjk0zfq5p5s2g"))))
   (build-system copy-build-system)
   (inputs
    (list hyprland
          jq
          libnotify))
   (arguments
    (list
     #:install-plan
     #~(list '("hdrop" "bin/hdrop"))
     #:phases
     #~(modify-phases %standard-phases
                      (add-after 'install 'wrap-hdrop
                                 (lambda _
                                   (wrap-script
                                    (string-append #$output "/bin/hdrop")
                                    '("PATH" suffix (#$(file-append jq 
"/bin")
#$(file-append hyprland "/bin")))))))
     ))
   (home-page "https://github.com/Schweber/hdrop")
   (synopsis "Emulate 'tdrop' in Hyprland (run, show and hide programs 
via keybind - similar to a dropdown terminal)")
   (description "Emulate 'tdrop' in Hyprland (run, show and hide 
programs via keybind - similar to a dropdown terminal)")
   (license license:agpl3)))
```

"wrap-program", on the other hand, which I now ended up using, works 
properly.





This bug report was last modified 71 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.