Skip to content

Commit

Permalink
implement nix build
Browse files Browse the repository at this point in the history
  • Loading branch information
ekg committed Dec 9, 2023
1 parent f44b402 commit 75e807c
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
5 changes: 5 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{ pkgs ? import <nixpkgs> {} }:

pkgs.callPackage ./seqwish.nix {
inherit (pkgs) stdenv fetchgit cmake gsl gmp makeWrapper jemalloc htslib git zlib pkg-config;
}
39 changes: 39 additions & 0 deletions seqwish.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}

0 comments on commit 75e807c

Please sign in to comment.