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

mosdepth: init 0.2.3 #43096

Merged
merged 1 commit into from Jul 9, 2018
Merged

mosdepth: init 0.2.3 #43096

merged 1 commit into from Jul 9, 2018

Conversation

jbedo
Copy link
Contributor

@jbedo jbedo commented Jul 6, 2018

Motivation for this change

mosdepth: init 0.2.3

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.


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";
Copy link
Member

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;
Copy link
Member

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; };
Copy link
Member

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";
Copy link
Member

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?

Copy link
Contributor Author

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";
Copy link
Member

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

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

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

Looking good!

@infinisil infinisil merged commit 8e2c3b9 into NixOS:master Jul 9, 2018
@jbedo jbedo deleted the mosdepth branch July 25, 2018 03:23
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

3 participants