diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..b848144 --- /dev/null +++ b/default.nix @@ -0,0 +1,5 @@ +{ pkgs ? import {} }: + +pkgs.callPackage ./seqwish.nix { + inherit (pkgs) stdenv fetchgit cmake gsl gmp makeWrapper jemalloc htslib git zlib pkg-config; +} \ No newline at end of file diff --git a/seqwish.nix b/seqwish.nix new file mode 100644 index 0000000..e1e4144 --- /dev/null +++ b/seqwish.nix @@ -0,0 +1,39 @@ +{ lib, stdenv, fetchgit, cmake, gsl, gmp, makeWrapper, jemalloc, htslib, git, zlib, pkg-config }: + +stdenv.mkDerivation rec { + pname = "seqwish"; + version = "0.7.9"; + + src = fetchgit { + url = "https://github.com/ekg/seqwish.git"; + rev = "f44b402f0c2e02988d431d9b2e5eba9727cf93a9"; + sha256 = "sha256-xEdiDyFwUYOQI7v4WH8Kv3UXQuBLIS3IjQi8Kv2ff9Q="; + fetchSubmodules = true; + }; + + # Add -march=native to the CFLAGS + NIX_CFLAGS_COMPILE = "-march=native"; + + nativeBuildInputs = [ cmake makeWrapper ]; + + buildInputs = [ + gsl + gmp + jemalloc + htslib + git + zlib + pkg-config + ]; + + postInstall = '' + wrapProgram $out/bin/seqwish --prefix PATH : ${lib.makeBinPath [ gsl gmp ]} + ''; + + meta = with lib; { + description = "alignment to variation graph inducer"; + homepage = "https://github.com/ekg/seqwish"; + license = licenses.mit; + platforms = platforms.linux; + }; +}