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

Conversation

KoviRobi
Copy link
Contributor

@KoviRobi 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

@Hodapp87
Copy link
Contributor

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

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 Hodapp87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me besides that upstream issue.

@KoviRobi
Copy link
Contributor Author

KoviRobi commented May 4, 2020

libfive/libfive#337

@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 (NixOS#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 NixOS#66128
@ofborg ofborg bot requested a review from Hodapp87 May 8, 2020 16:43
@srhb srhb merged commit 7625e27 into NixOS:master May 14, 2020
@KoviRobi KoviRobi deleted the libfive-2020-02-15 branch October 10, 2022 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants