-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
regina-normal: init at 7.3.1 #423945
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
base: master
Are you sure you want to change the base?
regina-normal: init at 7.3.1 #423945
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of notes btw
NIX_CFLAGS_COMPILE = "-I${graphviz}/include/graphviz"; | ||
NIX_LDFLAGS = "-L${graphviz}/lib -lgvc"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, stdenv is already aware of graphviz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without NIX_CFLAGS_COMPILE
, compilation fails:
/build/source/qtui/src/packets/facetgraphtab.cpp:63:10: fatal error: gvc.h: No such file or directory
63 | #include "gvc.h"
| ^~~~~~~
compilation terminated.
make[2]: *** [qtui/src/CMakeFiles/regina-gui.dir/build.make:393: qtui/src/CMakeFiles/regina-gui.dir/packets/facetgraphtab.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
perl | ||
python3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are they supposed to be run by the final program or during build? if the latter, they belong to nativeBuildInputs
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regina-python
requires both perl and python.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this script supposed to be executed at runtime or at compiletime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is installed in result/bin.
84dad7b
to
74015d9
Compare
d78ce34
to
9957ff8
Compare
8fea194
to
232d47b
Compare
96ab76d
to
f2c66f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello again! It's nice to find someone with an interest both in low-dimensional topology and Nixpkgs. Thank you for putting in the effort to open this PR.
Just a few suggestions which I hope can help get this merged.
databaseLibrary | ||
doxygen | ||
gmp | ||
jansson | ||
libxml2 | ||
libxslt | ||
pkg-config | ||
popt | ||
qt6.qtbase | ||
qt6.qtsvg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
databaseLibrary | |
doxygen | |
gmp | |
jansson | |
libxml2 | |
libxslt | |
pkg-config | |
popt | |
qt6.qtbase | |
qt6.qtsvg | |
doxygen | |
libxslt | |
pkg-config |
I think these belong in buildInputs
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I moved them, it still seems to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops you'll want to keep qt6.wrapQtAppsHook
in nativeBuildInputs
.
''; | ||
|
||
env = { | ||
NIX_CFLAGS_COMPILE = "-I${graphviz}/include/graphviz"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIX_CFLAGS_COMPILE = "-I${graphviz}/include/graphviz"; |
Does the build still fail if you remove this? It works for me. stdenv
should take care of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works now without it.
fbe8516
to
47f0ec6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another small change that reduces boilerplate.
878fdb6
to
ce03ca7
Compare
--replace-fail "my \$python_lib_dir = '''" \ | ||
"my \$python_lib_dir = '${placeholder "out"}/${python3.sitePackages}'" | ||
patchShebangs utils/testsuite/*.{in,test,sh} python/testsuite/test*.in python/regina-python.in | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
''; | |
'' | |
+ lib.optionalString stdenv.buildPlatform.isDarwin '' | |
substituteInPlace utils/testsuite/runtest.sh \ | |
--replace-fail "\`locale charmap 2>/dev/null\`" "UTF-8" | |
''; |
One of the tests was failing on Darwin, hopefully this fixes that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another suggestion: setting REGINA_PYLIBDIR
in a wrapper is probably a more robust way of getting Regina to find its Python module, and depends less on how regina-python.in
looks than patching that manually.
substituteInPlace python/regina-python.in \ | ||
--replace-fail "my \$python_lib_dir = '''" \ | ||
"my \$python_lib_dir = '${placeholder "out"}/${python3.sitePackages}'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
substituteInPlace python/regina-python.in \ | |
--replace-fail "my \$python_lib_dir = '''" \ | |
"my \$python_lib_dir = '${placeholder "out"}/${python3.sitePackages}'" |
"-DCMAKE_POLICY_DEFAULT_CMP0153=OLD" | ||
] | ||
++ lib.optionals highDim [ "-DHIGHDIM=1" ]; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preFixup = '' | |
qtWrapperArgs+=(--set-default REGINA_PYLIBDIR "$out/${python3.sitePackages}") | |
''; | |
postFixup = '' | |
# wrapQtAppsHook ignores files that are non-ELF executables | |
wrapProgram $out/bin/regina-python \ | |
--set-default REGINA_PYLIBDIR $out/${python3.sitePackages} | |
''; | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can clean up some CMake flags and environment variables.
"-DPython_EXECUTABLE=${python3.interpreter}" | ||
"-DPython_SITELIB=${python3.sitePackages}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"-DPython_EXECUTABLE=${python3.interpreter}" | |
"-DPython_SITELIB=${python3.sitePackages}" |
From my understanding, CMake sets these by itself when looking for Python.
env = { | ||
PERL_PYLIBDIR = "${placeholder "out"}/${python3.sitePackages}"; | ||
BASH_CMAKE_SOURCE_DIR = "${finalAttrs.src}"; | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stdenv.mkDerivation (finalAttrs: { | ||
pname = "regina-normal"; | ||
version = "7.3.1"; | ||
|
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Regina is a software package for low-dimensional topology.
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.