宋文武 <iyzs...@gmail.com> skribis: > Ludovic Courtès <l...@gnu.org> writes: > >> 宋文武 <iyzs...@gmail.com> skribis: >> >>> Mark H Weaver <m...@netris.org> writes: >>> >>>> 宋文武 <iyzs...@gmail.com> writes: >>>> >>>>> * gnu/packages/patches/nss.patch: New file. >>>>> * gnu-system.scm (dist_patch_DATA): Add it. >>>>> * gnu/packages/polkit.scm (nss): New variable. >>>> >>>> polkit.scm seems like the wrong place for 'nss', although admittedly >>>> it's not obvious where it should go. >>> Maybe move it and nspr gnuzilla.scm? Since they are both from mozilla. >> >> Yes please, sounds better. >> >>> NSS contains many static libraries which I think will not mostly used >>> by other. How about split them to a 'static-lib' (or a better name). >> >> Or just build it with --disable-static until someone asks for them? > Um, I leave it untouched. (It add about 7MB to Qt5.)
You were talking about the static libraries of NSS, not the static libraries of Qt, right? [...] >>> + (alist-replace >>> + 'install >>> + (lambda* (#:key outputs #:allow-other-keys) >>> + (let* ((out (assoc-ref outputs "out")) >>> + (bin (string-append (assoc-ref outputs "bin") "/bin")) >>> + (inc (string-append out "/include/nss")) >>> + (lib (string-append out "/lib/nss")) >>> + (obj (match (scandir "dist" (cut string-suffix? "OBJ" >>> <>)) >>> + ((obj) (string-append "dist/" obj))))) >>> + ;; Install nss-config to $out/bin. >>> + (mkdir-p (string-append out "/bin")) >>> + (copy-file (string-append obj "/bin/nss-config") >>> + (string-append out "/bin/nss-config")) >>> + (delete-file (string-append obj "/bin/nss-config")) >>> + ;; Install nss.pc to $out/lib/pkgconfig. >> >> So does this do the same thing that the big patch is supposed to do? >> I’m confused. > Actually, the patch do 'create', here do 'install'. Oh the patch adds code to create the files, and here it installs them. Thanks, Ludo’.