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
pgrouting: init at 2.6.2 #59292
pgrouting: init at 2.6.2 #59292
Conversation
configurePhase = '' | ||
mkdir -p build | ||
cd build | ||
cmake -L ../ |
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.
You shouldn't need to define a configure phase. cmake has one builtin that works, and adds some useful flags.
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.
Had no idea. It works!
cmake -L ../ | ||
''; | ||
|
||
installPhase = '' |
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.
This phase might not be needed as well. make install
should include everything.
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.
When removing this, I get:
Install the project...
-- Install configuration: "Release"
-- Installing: /nix/store/ysx12ay7qd8cvaf5k575zyhpqp35ifi3-postgresql-9.6.7-lib/lib/libpgrouting-2.6.so
CMake Error at cmake_install.cmake:50 (file):
file INSTALL cannot copy file
"/tmp/nix-build-pgrouting-2.6.2.drv-0/pgrouting-v2.6.2-src/build/lib/libpgrouting-2.6.so"
to
"/nix/store/ysx12ay7qd8cvaf5k575zyhpqp35ifi3-postgresql-9.6.7-lib/lib/libpgrouting-2.6.so".
Other pg extensions have a similar installPhase
so maybe we should keep it as it is.
@GrahamcOfBorg eval |
version = "2.6.2"; | ||
|
||
nativeBuildInputs = [ cmake ]; | ||
buildInputs = [ postgresql perl gcc boost gmp cgal mpfr ]; |
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.
gcc is provided by the stdenv so you don't need to mention it in buildInputs.
Also perl in not referenced in the build products so I imagine it is a build-time dependency which belongs to nativeBuildInputs (please check, nevertheless).
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.
All true. Corrected.
* Remove configurePhase and gcc. Move perl dependency * Shorten github rev * Add $out/bin workaround
@GrahamcOfBorg eval |
built and tested locally |
Motivation for this change
pgRouting extends the PostGIS / PostgreSQL geospatial database to provide geospatial routing functionality.
I mostly copied the equivalent archlinux package instructions https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=pgrouting.
If there's a more idiomatic way to build the package in nix please let me know.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)