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: init at 2018-07-01 #42824
libfive: init at 2018-07-01 #42824
Conversation
|
||
stdenv.mkDerivation rec { | ||
name = "libfive-${version}"; | ||
version = "755f7fed"; |
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.
If the package doesn't have frequent releases, usually the date of the commit is used as the version then, in YYYY-MM-DD format.
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.
Good to know. Doing that and the below.
src = fetchFromGitHub { | ||
owner = "libfive"; | ||
repo = "libfive"; | ||
rev = "${version}"; |
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.
Then you can put the full git hash here
rev = "${version}"; | ||
sha256 = "1cjvmfsjbc3k5zfp22zccmjx0b2rmm2a0vm555f3bqj81yw9v7ps"; | ||
}; | ||
buildInputs = [ cmake pkgconfig eigen3_3 zlib libpng |
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.
cmake
and pkgconfig
should be in nativeBuildInputs
(because they're tools used at build time)
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.
Try using ninja with cmake, it often builds faster.
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.
How do you mean?
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.
Add ninja dependency next to cmake.
|
||
# Rename "Studio" binary to "libfive-studio" to be more obvious | ||
postFixup = '' | ||
mv "$out/bin/Studio" "$out/bin/libfive-studio" |
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.
Wouldn't this confuse people who used it in other package managers? I think either not changing the name at all, or at least symlinking so both names are usable, would be better.
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.
If it's no problem having a generically-named "Studio" binary, sure, I'll do that.
owner = "libfive"; | ||
repo = "libfive"; | ||
rev = "${version}"; | ||
sha256 = "1cjvmfsjbc3k5zfp22zccmjx0b2rmm2a0vm555f3bqj81yw9v7ps"; |
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.
Also, I get a hash mismatch, the correct one is 1ah4yw62kb2qk19ban6nv8b61fb9g8vkk5ramnp99xz3r8bjpf7c
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.
Weird, I must have been distracted when building this...
buildInputs = [ cmake pkgconfig eigen3_3 zlib libpng | ||
boost qt5.qtimageformats guile ]; | ||
|
||
enableParallelBuilding = true; |
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.
Cmake builds in parallel by default.
15ece2f
to
5aa3de5
Compare
@GrahamcOfBorg build libfive |
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: libfive Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: libfive Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: libfive Partial log (click to expand)
|
Looks good to me |
Motivation for this change
The usual: Needed this package and figured I'd add a derivation.
Should build on Mac but I've nothing to test this.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)