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

lcalc: init at 1.23 #38796

Merged
merged 2 commits into from Apr 22, 2018
Merged

lcalc: init at 1.23 #38796

merged 2 commits into from Apr 22, 2018

Conversation

timokau
Copy link
Member

@timokau timokau commented Apr 11, 2018

Motivation for this change

Package lcalc.

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.

sha256 = "1c6dsdshgxhqppjxvxhp8yhpxaqvnz3d1mlh26r571gkq8z2bm43";
};

preConfigure = "cd src";
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

The patches assume to be in the lcalc-${version} directory. Using source root, it'd be necessary to

  • hard code the name of that directory (it would be way nicer if the standard unpackPhase would rename that directory to a standardized name, like source)
  • add stripLen or however that option was called to all patches

I think its nicer the way it is.

@dotlambda
Copy link
Member

@GrahamcOfBorg build lcalc

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: lcalc

Partial log (click to expand)

Cannot nix-instantiate `lcalc' because:
error: while evaluating ‘callPackageWith’ at /home/ofborg/ofborg1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-7c6f434c1/lib/customisation.nix:113:35, called from /home/ofborg/ofborg1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-7c6f434c1/pkgs/top-level/all-packages.nix:19817:11:
while evaluating ‘makeOverridable’ at /home/ofborg/ofborg1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-7c6f434c1/lib/customisation.nix:72:24, called from /home/ofborg/ofborg1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-7c6f434c1/lib/customisation.nix:117:8:
undefined variable ‘placeholder’ at /home/ofborg/ofborg1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-7c6f434c1/pkgs/development/libraries/science/math/lcalc/default.nix:63:16

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: lcalc

Partial log (click to expand)

install -m 644 -t /nix/store/l28wczfq5xfxdljd0g08rn5y0m1zvyy2-lcalc-1.23/include/libLfunction ../include/*.h
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/l28wczfq5xfxdljd0g08rn5y0m1zvyy2-lcalc-1.23
shrinking /nix/store/l28wczfq5xfxdljd0g08rn5y0m1zvyy2-lcalc-1.23/lib/libLfunction.so
shrinking /nix/store/l28wczfq5xfxdljd0g08rn5y0m1zvyy2-lcalc-1.23/bin/lcalc
strip is /nix/store/j7d4mr0ikv974ig7yzhknpsq288js4bs-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/l28wczfq5xfxdljd0g08rn5y0m1zvyy2-lcalc-1.23/lib  /nix/store/l28wczfq5xfxdljd0g08rn5y0m1zvyy2-lcalc-1.23/bin
patching script interpreter paths in /nix/store/l28wczfq5xfxdljd0g08rn5y0m1zvyy2-lcalc-1.23
checking for references to /build in /nix/store/l28wczfq5xfxdljd0g08rn5y0m1zvyy2-lcalc-1.23...
/nix/store/l28wczfq5xfxdljd0g08rn5y0m1zvyy2-lcalc-1.23

];

installFlags = [
"DESTDIR=${placeholder "out"}"
Copy link
Member

Choose a reason for hiding this comment

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

Can you try using prefix here too?

Copy link
Member Author

Choose a reason for hiding this comment

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

Doesn't work in this case:

installing
install flags: install SHELL=/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash PARI_DEFINE=-DINCLUDE_PARI PARI_PREFIX=/nix/store/zmmdpgflz2fqmqkkc7d92k4qv3rvfs6h-pari-2.9.4 PREFIX=/nix/store/a8ckm9idhhvb3lwnk2jgz8pwjaiisf9h-lcalc-1.23
install -d /bin
install -d /lib
install -d /include/libLfunction
install: cannot create directory '/include': Permission denied
make: *** [Makefile:273: install] Error 1
builder for '/nix/store/v3kdhl15p1sy49766gydgpf8hm6cdq8r-lcalc-1.23.drv' failed with exit code 2

Copy link
Member

Choose a reason for hiding this comment

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

Usually this will work:

"DESTDIR=$(out)"

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I'll use that.



-INSTALL_DIR= /usr/local
+INSTALL_DIR= $(DESTDIR)
Copy link
Member

Choose a reason for hiding this comment

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

You could probably get rid of this line and set $INSTALL_DIR in installFlags.

Copy link
Member Author

Choose a reason for hiding this comment

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

But would that be better? It wouldnt reduce the patch size (still necessary to remove INSTALL_DIR = /usr/local) and $(DESTDIR) seems like a reasonable default.

Even without that line, DESTDIR must still be set.

Copy link
Member

Choose a reason for hiding this comment

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

Well then just leave it like it is.

@matthewbauer matthewbauer merged commit 10124a4 into NixOS:master Apr 22, 2018
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

4 participants