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
mosdepth: init 0.2.3 #43096
mosdepth: init 0.2.3 #43096
Conversation
|
||
buildPhase = "nim -p:${hts-nim}/src -p:${docopt}/src c -d:release mosdepth.nim"; | ||
installPhase = "install -Dt $out/bin mosdepth"; | ||
fixupPhase = "patchelf --set-rpath ${stdenv.cc.cc.lib}/lib:${makeLibraryPath [ stdenv.cc.cc htslib pcre ]} $out/bin/mosdepth"; |
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.
Should be the same as --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc htslib pcre ]}"
license = licenses.mit; | ||
homepage = https://github.com/brentp/mosdepth; | ||
maintainers = with maintainers; [ jbedo ]; | ||
platforms = stdenv.lib.platforms.linux; |
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 can use platforms = platforms.linux;
here as you have a with stdenv.lib;
above.
@@ -0,0 +1,43 @@ | |||
{stdenv, fetchFromGitHub, nim, htslib, patchelf, pcre}: | |||
|
|||
with { inherit (stdenv.lib) makeLibraryPath; }; |
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.
Remove this, and use stdenv.lib.makeLibraryPath
directly.
Also, place a let in
here and move the hts-nim
and docopt
sources here. Something like
{stdenv, fetchFromGitHub, nim, htslib, patchelf, pcre}:
let
hts-nim = fetchFromGitHub {
# ...
};
docopt = fetchFromGitHub {
# ...
};
in
stdenv.mkDerivation rec { ...
|
||
buildInputs = [ nim ]; | ||
|
||
buildPhase = "nim -p:${hts-nim}/src -p:${docopt}/src c -d:release mosdepth.nim"; |
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.
Does Nim require you to have the dependencies sources in order to use them?
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.
Unfortunately yes, there doesn't seem to be a better way of packaging nim apps atm.
hts-nim = fetchFromGitHub { | ||
owner = "brentp"; | ||
repo = "hts-nim"; | ||
rev = "9cd83e3"; |
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.
Use either a full git hash or a tag here 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.
Looking good!
Motivation for this change
mosdepth: init 0.2.3
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)