2021-01-15 13:21:58 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
zlib,
|
|
|
|
blas,
|
|
|
|
lapack,
|
|
|
|
darwin,
|
|
|
|
}:
|
2016-11-13 23:49:40 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00: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";
|
|
|
|
};
|
|
|
|
|
2020-03-31 14:47:18 +00:00
|
|
|
buildInputs =
|
|
|
|
[ zlib ]
|
|
|
|
++ (
|
|
|
|
if stdenv.hostPlatform.isDarwin then
|
|
|
|
[ darwin.apple_sdk.frameworks.Accelerate ]
|
|
|
|
else
|
|
|
|
[
|
|
|
|
blas
|
|
|
|
lapack
|
|
|
|
]
|
|
|
|
);
|
2016-11-13 23:49:40 +00:00
|
|
|
|
2020-03-31 14:47:18 +00:00
|
|
|
preBuild = ''
|
2016-11-13 23:49:40 +00:00
|
|
|
sed -i 's|zlib-1.2.8/zlib.h|zlib.h|g' *.c *.h
|
2023-02-06 20:49:02 +00:00
|
|
|
${lib.optionalString stdenv.cc.isClang "sed -i 's|g++|clang++|g' Makefile.std"}
|
2020-03-31 14:47:18 +00:00
|
|
|
|
|
|
|
makeFlagsArray+=(
|
|
|
|
ZLIB=-lz
|
|
|
|
BLASFLAGS="-lblas -lcblas -llapack"
|
|
|
|
);
|
2016-11-13 23:49:40 +00:00
|
|
|
'';
|
|
|
|
|
2020-03-31 14:47:18 +00:00
|
|
|
makefile = "Makefile.std";
|
|
|
|
|
2016-11-13 23:49:40 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp plink $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2022-05-29 09:37:28 +00:00
|
|
|
broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
|
2016-11-13 23:49:40 +00:00
|
|
|
description = "Comprehensive update to the PLINK association analysis toolset";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "plink";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.cog-genomics.org/plink2";
|
2021-01-15 13:21:58 +00:00
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
platforms = lib.platforms.linux;
|
2016-11-13 23:49:40 +00:00
|
|
|
};
|
|
|
|
}
|