2016-11-13 23:49:40 +00:00
|
|
|
{ stdenv, fetchFromGitHub, zlib, openblas, darwin}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "plink-ng";
|
2016-11-13 23:49:40 +00:00
|
|
|
version = "1.90b3";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "chrchang";
|
|
|
|
repo = "plink-ng";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1zhffjbwpd50dxywccbnv1rxy9njwz73l4awc5j7i28rgj3davcq";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ zlib ] ++ (if stdenv.isDarwin then [ darwin.apple_sdk.frameworks.Accelerate ] else [ openblas ]) ;
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
sed -i 's|zlib-1.2.8/zlib.h|zlib.h|g' *.c *.h
|
|
|
|
${if stdenv.cc.isClang then "sed -i 's|g++|clang++|g' Makefile.std" else ""}
|
|
|
|
make ZLIB=-lz ${if stdenv.isDarwin then "" else "BLASFLAGS=-lopenblas"} -f Makefile.std
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp plink $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A comprehensive update to the PLINK association analysis toolset";
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = https://www.cog-genomics.org/plink2;
|
2016-11-13 23:49:40 +00:00
|
|
|
license = stdenv.lib.licenses.gpl3;
|
2017-09-22 17:49:57 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2016-11-13 23:49:40 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|