Hi Tomas,
How about this instead?
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 1536e913bf6..de0ec88c0f8 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -1348,6 +1348,13 @@ (define* (wrapped-package package
(elf-loader-compile-flags program)))
(delete-file "run.c")))
+ (define (executable? file)
+ ;; Return #t if FILE is a regular file and is executable.
+ (let ((s (stat file #f)))
+ (and s
+ (eq? 'regular (stat:type s))
+ (not (zero? (logand (stat:mode s) #o100))))))
+
(setvbuf (current-output-port) 'line)
;; Link the top-level files of PACKAGE so that search paths are
@@ -1360,7 +1367,7 @@ (define* (wrapped-package package
(scandir input))
(receive (executables others)
- (partition executable-file?
+ (partition executable?
;; Note: Trailing slash in case these are symlinks.
(append (find-files (string-append input "/bin/"))
(find-files (string-append input "/sbin/"))
That would avoid wrapping directories (!) and everything should work
much better afterwards.
Thanks,
Ludo’.