summaryrefslogtreecommitdiff
path: root/gnu/packages/file-systems.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2021-07-09 02:56:08 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2021-07-09 04:30:39 +0200
commit7292585f3c51112a4877f86007f43e24b12d412b (patch)
treee69f7df737df3f4abd417b4a91a77b5e4289e165 /gnu/packages/file-systems.scm
parent478104c398840d8fa9415d1250d4501b2280d2f3 (diff)
downloadguix-7292585f3c51112a4877f86007f43e24b12d412b.tar.gz
guix-7292585f3c51112a4877f86007f43e24b12d412b.tar.xz
gnu: mergerfs: Clean up arguments.
* gnu/packages/file-systems.scm (mergerfs)[arguments]: Remove some incorrect comments & rewrite code accordingly. Pass the PREFIX as a make flag.
Diffstat (limited to 'gnu/packages/file-systems.scm')
-rw-r--r--gnu/packages/file-systems.scm32
1 files changed, 14 insertions, 18 deletions
diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index 2332258928..9b8f60ce61 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -1391,32 +1391,28 @@ On Guix System, you will need to invoke the included shell scripts as
(arguments
`(#:make-flags
(list (string-append "CC=" ,(cc-for-target))
- (string-append "CXX=" ,(cxx-for-target)))
- #:tests? #f ; No tests exist.
+ (string-append "CXX=" ,(cxx-for-target))
+ (string-append "PREFIX=" (assoc-ref %outputs "out")))
+ #:tests? #f ; all require a kernel with FUSE loaded
#:phases
(modify-phases %standard-phases
- (delete 'configure)
- (add-after 'unpack 'fix-paths
+ (delete 'configure) ; no configure script
+ (add-after 'unpack 'set-file-names
(lambda* (#:key inputs outputs #:allow-other-keys)
- (setenv "CC" "gcc")
- ;; These were copied from the package libfuse.
- (substitute* '("libfuse/lib/mount_util.c" "libfuse/util/mount_util.c")
+ (substitute* "libfuse/Makefile"
+ (("/sbin") "$(EXEC_PREFIX)/sbin")
+ (("chown") "true") ; disallowed in the build environment
+ (("strip") "true")) ; breaks cross-compilation
+ ;; These were copied from the fuse package.
+ (substitute* '("libfuse/lib/mount_util.c"
+ "libfuse/util/mount_util.c")
(("/bin/(u?)mount" _ maybe-u)
(string-append (assoc-ref inputs "util-linux")
"/bin/" maybe-u "mount")))
(substitute* '("libfuse/util/mount.mergerfs.c")
(("/bin/sh" command)
- (string-append (assoc-ref inputs "bash-minimal") command)))
- ;; The Makefile does not allow overriding PREFIX via make variables.
- (substitute* '("Makefile" "libfuse/Makefile")
- (("= /usr/local") (string-append "= " (assoc-ref outputs "out")))
- (("= /sbin") "= $(EXEC_PREFIX)/sbin")
- ;; cannot chown as build user
- (("chown root(:root)?") "true")
- ;; Breaks cross-compilation.
- (("strip") "true"))
- #t)))))
- ;; mergerfs bundles a heavily modified copy of libfuse.
+ (string-append (assoc-ref inputs "bash-minimal") command))))))))
+ ;; Mergerfs bundles a heavily modified copy of fuse.
(inputs
`(("bash-minimal" ,bash-minimal)
("util-linux" ,util-linux)))