2021-01-17 00:15:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, zlib, blas, lapack, darwin}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "plink-ng";
|
|
|
|
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 [ blas lapack ]) ;
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
sed -i 's|zlib-1.2.8/zlib.h|zlib.h|g' *.c *.h
|
2023-02-16 17:41:37 +00:00
|
|
|
${lib.optionalString stdenv.cc.isClang "sed -i 's|g++|clang++|g' Makefile.std"}
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
makeFlagsArray+=(
|
|
|
|
ZLIB=-lz
|
|
|
|
BLASFLAGS="-lblas -lcblas -llapack"
|
|
|
|
);
|
|
|
|
'';
|
|
|
|
|
|
|
|
makefile = "Makefile.std";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp plink $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = (stdenv.isLinux && stdenv.isAarch64);
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A comprehensive update to the PLINK association analysis toolset";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "plink";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.cog-genomics.org/plink2";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|