New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gnutls: fix guile bindings #80206
gnutls: fix guile bindings #80206
Conversation
I had (almost) exactly this patch sitting on my machine for a couple of months :D |
] ++ lib.optional guileBindings [ | ||
"--enable-guile" | ||
"--with-guile-site-dir=\${out}/share/guile/site" | ||
"--with-guile-site-ccache-dir=\${out}/share/guile/site" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"--with-guile-site-ccache-dir=\${out}/share/guile/site" | |
"--with-guile-site-ccache-dir=\${out}/share/guile/site/site-ccache" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally had it as ${out}/lib/guile/2.2/site-ccache
, based on the guile default on other systems being /usr/lib/guile/2.2/site-ccache
. However, I changed it to ${out}/share/guile/site
because
- That's what the only other package (
guile-xcb
) using this configure flag does. - There's no mention of a directory named
site-ccache
inpkgs/development/interpreters/guile/setup-hook-2.2.sh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the fact your suggested site-ccache
is a subdirectory of the site
directory (which is added to the guile load paths), mean that it will work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Since we seem to put it in /share/guile
everywhere, let's do that and not lib/guile
.
If it works without the site-ccache
suffix, that's fine.
It's just a little bit more neat, if it's got its own subdirectory.
That's what they do upstream, too: https://gitlab.com/gnutls/gnutls/commit/499a021b968033057944492ee3074f0898aa4dba#d5b4de16d947214ec306bd57bed1bd23a939b5f9_23_27
And in Guix's "nixpkgs": http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/tls.scm#n200
"--enable-guile" | ||
"--with-guile-site-dir=\${out}/share/guile/site" | ||
"--with-guile-site-ccache-dir=\${out}/share/guile/site" | ||
"--with-guile-extension-dir=\${out}/share/guile/site" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"--with-guile-extension-dir=\${out}/share/guile/site" | |
"--with-guile-extension-dir=\${out}/share/guile/site/site-ccache" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this works, please update @Thra11
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/guile-module-packaging-guidelines/5909/1 |
Hi, might this be merged? |
This seems to be a strict improvement over the status quo, as it only touches the broken part of |
Thanks for fixing this @Thra11! |
Motivation for this change
The gnutls derivation fails to build if the
guileBindings
argument is set to true: It attempts to install some of the guile bits in what it presumes to be the system-wide guile path, i.e. inside the guile output path.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)I confirmed that it builds, and that the gnutls module is then available in the guile repl.