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

zn_poly: init at 0.9 #38805

Merged
merged 1 commit into from Apr 24, 2018
Merged

zn_poly: init at 0.9 #38805

merged 1 commit into from Apr 24, 2018

Conversation

timokau
Copy link
Member

@timokau timokau commented Apr 11, 2018

Motivation for this change

Package zn_poly.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

# Tuning (either autotuning or with hand-written paramters) is possible
# but not implemented here.
# It seems buggy anyways (see homepage).
buildFlags = "all libzn_poly.so";
Copy link
Member

Choose a reason for hiding this comment

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

The libzn_poly.so doesn't seem very portable (for instance macOS uses .dylib, Windows uses .dll). Are you sure it's needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes its needed, its not included in all.

I just checked and gentoo and the sage package both special-case darwin with libzn_poly.dylib. Neither has a special case for windows, although sage supports windows as far as I know.

I'll add the darwin special case, but I cannot test it.

Copy link
Member

Choose a reason for hiding this comment

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

Okay here is the portable way to do this I think: (see

"'${libusb1}/lib/libusb-1.0${stdenv.hostPlatform.extensions.sharedLibrary}'"
)

buildFlags = "all libzn_poly${stdenv.hostPlatform.extensions.sharedLibrary}";

Copy link
Member Author

Choose a reason for hiding this comment

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

Great! I changed that.

It should be targetPlatform though, right?

installPhase = ''
mkdir -p "$out/include/zn_poly"
mkdir -p "$out/lib"
ls
Copy link
Member

Choose a reason for hiding this comment

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

This should be removed.

Also check to make sure "make install" doesn't work- it's okay to supply installPhase just usually a lot harder to maintain.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, its necessary. For some reason the regular make install does not install some header files and the so file. I've added a comment explaining this (and removed the stray ls).

@matthewbauer
Copy link
Member

matthewbauer commented Apr 19, 2018

Is there a package that needs "zn_poly"? It's probably okay to have in Nixpkgs but note that it's unmaintained.

http://web.maths.unsw.edu.au/~davidharvey/code/zn_poly/

Copy link
Member

@matthewbauer matthewbauer left a comment

Choose a reason for hiding this comment

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

Avoid libzn_poly.so target

@timokau
Copy link
Member Author

timokau commented Apr 22, 2018

Its a dependency of sagelib. Thanks for reviewing.

@timokau
Copy link
Member Author

timokau commented Apr 24, 2018

Since github apparently doesn't allow me to mark a change request as resolved: It should be resolved. The target is still there, but more portable.

@matthewbauer matthewbauer merged commit 7ebb621 into NixOS:master Apr 24, 2018
@timokau timokau deleted the zn_poly-init branch April 24, 2018 14:30
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