mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 21:13:40 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
42 lines
1.1 KiB
Nix
42 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, zlib, blas, lapack, darwin}:
|
|
|
|
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.hostPlatform.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
|
|
${lib.optionalString stdenv.cc.isClang "sed -i 's|g++|clang++|g' Makefile.std"}
|
|
|
|
makeFlagsArray+=(
|
|
ZLIB=-lz
|
|
BLASFLAGS="-lblas -lcblas -llapack"
|
|
);
|
|
'';
|
|
|
|
makefile = "Makefile.std";
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp plink $out/bin
|
|
'';
|
|
|
|
meta = {
|
|
broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
|
|
description = "Comprehensive update to the PLINK association analysis toolset";
|
|
mainProgram = "plink";
|
|
homepage = "https://www.cog-genomics.org/plink2";
|
|
license = lib.licenses.gpl3;
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
}
|