summary refs log tree commit diff
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2016-11-14 10:49:40 +1100
committerJustin Bedo <cu@cua0.org>2016-11-14 20:28:39 +1100
commita6d6a3972f22e47d76a286da5369d79f2e002c87 (patch)
treef9f7406d1a39320e2f9b34d975eb6a98910943ae
parentcad9212813603cf3339dc56be974177941a8b3a7 (diff)
downloadnixpkgs-a6d6a3972f22e47d76a286da5369d79f2e002c87.tar
nixpkgs-a6d6a3972f22e47d76a286da5369d79f2e002c87.tar.gz
nixpkgs-a6d6a3972f22e47d76a286da5369d79f2e002c87.tar.bz2
nixpkgs-a6d6a3972f22e47d76a286da5369d79f2e002c87.tar.lz
nixpkgs-a6d6a3972f22e47d76a286da5369d79f2e002c87.tar.xz
nixpkgs-a6d6a3972f22e47d76a286da5369d79f2e002c87.tar.zst
nixpkgs-a6d6a3972f22e47d76a286da5369d79f2e002c87.zip
plink-ng: init at 1.90b3
-rw-r--r--pkgs/applications/science/biology/plink-ng/default.nix34
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/applications/science/biology/plink-ng/default.nix b/pkgs/applications/science/biology/plink-ng/default.nix
new file mode 100644
index 00000000000..eb4d2714a12
--- /dev/null
+++ b/pkgs/applications/science/biology/plink-ng/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub, zlib, openblas, darwin}:
+
+stdenv.mkDerivation rec {
+  name = "plink-ng-${version}";
+  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";
+    homepage = "https://www.cog-genomics.org/plink2";
+    license = stdenv.lib.licenses.gpl3;
+    platforms = stdenv.lib.platforms.all;
+  };
+}
+
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index b3a881fc9ad..4c2690d1c65 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -16350,6 +16350,8 @@ in
   paml = callPackage ../applications/science/biology/paml { };
 
   plink = callPackage ../applications/science/biology/plink/default.nix { };
+  
+  plink-ng = callPackage ../applications/science/biology/plink-ng/default.nix { };
 
   samtools = callPackage ../applications/science/biology/samtools/default.nix { };