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

libfive: 2018-07-01 -> 2020-02-15 #83711

Merged
merged 1 commit into from May 14, 2020
Merged

libfive: 2018-07-01 -> 2020-02-15 #83711

merged 1 commit into from May 14, 2020

Conversation

@KoviRobi
Copy link
Contributor

KoviRobi commented Mar 29, 2020

Use proper Qt bindings (#65399). Note, current version didn't work for
me, new version does.

The libfive library is licensed under MPL 2.0, while the libfive-guile
and libfive-studio are under GPL 2+

Superseeds / closes #66128

Motivation for this change
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.
@KoviRobi
Copy link
Contributor Author

KoviRobi commented Apr 11, 2020

EDIT: Turns out there is a different way to load libfive into guile, not sure if there is a guile.withPackages or something, to help with this.

The guile modules don't seem to have installed (nor in the original), libfive/libfive#336

@KoviRobi KoviRobi force-pushed the KoviRobi:libfive-2020-02-15 branch from a2f539b to 0bf10f4 Apr 12, 2020
@Hodapp87
Copy link
Contributor

Hodapp87 commented Apr 12, 2020

What is the actual way to load libfive into guile on this? This is all I can get:

$ nix-shell -I nixpkgs=~/nixpkgs -p libfive

[nix-shell:~]$ guile
GNU Guile 2.2.6
Copyright (C) 1995-2019 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (load-extension "libfive-guile" "scm_init_libfive_modules")
ERROR: In procedure load-extension:
In procedure dynamic-link: file: "libfive-guile", message: "file not found"

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> 
@KoviRobi
Copy link
Contributor Author

KoviRobi commented Apr 12, 2020

Unfortunately you'll have to use an absolute path currently, e.g.

(load-extension (string-append (getenv "LIBFIVE") "/lib/libfive-guile.so") "scm_init_libfive_modules")

where in your shell.nix you have LIBFIVE = libfive; (or lower-case it and inherit libfive;).

The proper way to do this would be to have e.g. a file libfive/modules.scm that does the load-extension https://www.gnu.org/software/guile/manual/html_node/Modules-and-Extensions.html#index-extensiondir-1, I'll suggest that to upstream because currenly even libraries using libfive-guile have to do something similar: https://gitlab.com/kavalogic-inc/inspekt3d/-/blob/master/inspekt3d/library.scm#L21-22

Copy link
Contributor

Hodapp87 left a comment

Looks fine to me besides that upstream issue.

@KoviRobi
Copy link
Contributor Author

KoviRobi commented May 4, 2020

@Hodapp87
Copy link
Contributor

Hodapp87 commented May 5, 2020

I approved the changes myself. Merge is probably still waiting on you to fix the merge conflicts

Use proper Qt bindings (#65399). Note, current version didn't work for
me, new version does.

The libfive library is licensed under MPL 2.0, while the libfive-guile
and libfive-studio are under GPL 2+

Superseeds #66128
@KoviRobi KoviRobi force-pushed the KoviRobi:libfive-2020-02-15 branch from 0bf10f4 to 1e463bd May 8, 2020
@ofborg ofborg bot requested a review from Hodapp87 May 8, 2020
@srhb srhb merged commit 7625e27 into NixOS:master May 14, 2020
16 checks passed
16 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="1e463bd"; rev="1e463bd6024d9f6c34d0ff423d626991a01a17de"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="1e463bd"; rev="1e463bd6024d9f6c34d0ff423d626991a01a17de"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="1e463bd"; rev="1e463bd6024d9f6c34d0ff423d626991a01a17de"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="1e463bd"; rev="1e463bd6024d9f6c34d0ff423d626991a01a17de"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="1e463bd"; rev="1e463bd6024d9f6c34d0ff423d626991a01a17de"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="1e463bd"; rev="1e463bd6024d9f6c34d0ff423d626991a01a17de"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="1e463bd"; rev="1e463bd6024d9f6c34d0ff423d626991a01a17de"; } ./pkgs/t
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
libfive, libfive.passthru.tests on aarch64-linux Success
Details
libfive, libfive.passthru.tests on x86_64-linux Success
Details
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

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