Skip to content
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

Merged
merged 1 commit into from May 7, 2020
Merged

gnutls: fix guile bindings #80206

merged 1 commit into from May 7, 2020

Conversation

@Thra11
Copy link
Contributor

Thra11 commented Feb 15, 2020

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
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

I confirmed that it builds, and that the gnutls module is then available in the guile repl.

@Thra11 Thra11 force-pushed the Thra11:guile-gnutls branch from 768fc96 to a7dc5f5 Feb 15, 2020
@Thra11 Thra11 changed the title gnutls: Fix guile bindings gnutls: fix guile bindings Feb 15, 2020
@JohnAZoidberg
Copy link
Member

JohnAZoidberg commented Feb 15, 2020

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"

This comment has been minimized.

Copy link
@JohnAZoidberg

JohnAZoidberg Feb 15, 2020

Member
Suggested change
"--with-guile-site-ccache-dir=\${out}/share/guile/site"
"--with-guile-site-ccache-dir=\${out}/share/guile/site/site-ccache"

This comment has been minimized.

Copy link
@Thra11

Thra11 Feb 15, 2020

Author Contributor

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

  1. That's what the only other package (guile-xcb) using this configure flag does.
  2. There's no mention of a directory named site-ccache in pkgs/development/interpreters/guile/setup-hook-2.2.sh

This comment has been minimized.

Copy link
@Thra11

Thra11 Feb 15, 2020

Author Contributor

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?

This comment has been minimized.

Copy link
@JohnAZoidberg

JohnAZoidberg Feb 15, 2020

Member

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"

This comment has been minimized.

Copy link
@JohnAZoidberg

JohnAZoidberg Feb 15, 2020

Member
Suggested change
"--with-guile-extension-dir=\${out}/share/guile/site"
"--with-guile-extension-dir=\${out}/share/guile/site/site-ccache"

This comment has been minimized.

Copy link
@bqv

bqv Apr 1, 2020

Contributor

If this works, please update @Thra11

@nixos-discourse
Copy link

nixos-discourse commented Feb 16, 2020

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

@bqv
Copy link
Contributor

bqv commented Apr 1, 2020

Hi, might this be merged?

@timokau timokau mentioned this pull request May 7, 2020
7 of 10 tasks complete
@timokau
Copy link
Member

timokau commented May 7, 2020

This seems to be a strict improvement over the status quo, as it only touches the broken part of gnutls. Merging for now since the author seems to be unavailable for now and the only outstanding request for changes is not terribly important. It would be nice to adopt @JohnAZoidberg's suggestion in a follow-up though if somebody wants do to that.

@timokau timokau merged commit bbb8132 into NixOS:master May 7, 2020
14 checks passed
14 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
gnutls on aarch64-linux Success
Details
gnutls on x86_64-linux Success
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@timokau
Copy link
Member

timokau commented May 7, 2020

Thanks for fixing this @Thra11!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.