guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#55369] [PATCH 1/2] gnu: zfs: Use new package style.


From: Maxime Devos
Subject: [bug#55369] [PATCH 1/2] gnu: zfs: Use new package style.
Date: Wed, 11 May 2022 16:57:53 +0200
User-agent: Evolution 3.38.3-1

Brian Cully via Guix-patches via schreef op wo 11-05-2022 om 09:37 [-
0400]:
> -         (add-after 'unpack 'patch-source
> -           (lambda* (#:key inputs outputs #:allow-other-keys)
> -             (let ((out        (assoc-ref outputs "out"))
> -                   (src        (assoc-ref outputs "src"))
> -                   (util-linux (assoc-ref inputs "util-linux"))
> -                   (nfs-utils  (assoc-ref inputs "nfs-utils"))
> -                   (kmod       (assoc-ref inputs "kmod-runtime")))
[...]
> +          (add-after 'unpack 'patch-source
> +            (lambda _ [...]
> +              (substitute* "lib/libzfs/os/linux/libzfs_util_os.c"
> +                ;; Use path to /gnu/store/*-kmod in actual path that is 
> exec'ed.
> +                (("\"/sbin/modprobe\"")
> +                 (string-append "\"" #$kmod "/bin/modprobe" "\""))

This breaks package transformations -- now the 'kmod' from (gnu
packages linux) is hardcoded, it cannot be replaced by something else
with --with-input or (package (inherit ...) (inputs (list custom-kmod
...)) or the like.  (Currently no mechanism exists to rewrite G-exps.)

Instead, do

  (lambda* (#:key inputs #:allow-other-keys)
    [...]
    (string-append "\"" (search-input-file inputs "bin/modprobe))
    [...])
Greetings,
Maxime.

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]