uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
50
pkgs/applications/science/biology/samtools/default.nix
Normal file
50
pkgs/applications/science/biology/samtools/default.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, zlib, htslib, perl, ncurses ? null }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "samtools";
|
||||
version = "1.13";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/samtools/samtools/releases/download/${version}/${pname}-${version}.tar.bz2";
|
||||
sha256 = "sha256-YWyi4FHMgAmh6cAc/Yx8r4twkW3f9m87dpFAeUZfjGA=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Pull upstream patch for ncurses-6.3 support
|
||||
(fetchpatch {
|
||||
name = "ncurses-6.3.patch";
|
||||
url = "https://github.com/samtools/samtools/commit/396ef20eb0854d6b223c3223b60bb7efe42301f7.patch";
|
||||
sha256 = "sha256-p0l9ymXK9nqL2w8EytbW+qeaI7dD86IQgIVxacBj838=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ perl ];
|
||||
|
||||
buildInputs = [ zlib ncurses htslib ];
|
||||
|
||||
preConfigure = lib.optional stdenv.hostPlatform.isStatic ''
|
||||
export LIBS="-lz -lbz2 -llzma"
|
||||
'';
|
||||
makeFlags = lib.optional stdenv.hostPlatform.isStatic "AR=${stdenv.cc.targetPrefix}ar";
|
||||
|
||||
configureFlags = [ "--with-htslib=${htslib}" ]
|
||||
++ lib.optional (ncurses == null) "--without-curses"
|
||||
++ lib.optional stdenv.hostPlatform.isStatic ["--without-curses" ]
|
||||
;
|
||||
|
||||
preCheck = ''
|
||||
patchShebangs test/
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tools for manipulating SAM/BAM/CRAM format";
|
||||
license = licenses.mit;
|
||||
homepage = "http://www.htslib.org/";
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ mimame unode ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 2f51bfc..395d6f1 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,7 +1,7 @@
|
||||
CC= gcc
|
||||
CFLAGS= -g -Wall -O2
|
||||
#LDFLAGS= -Wl,-rpath,\$$ORIGIN/../lib
|
||||
-DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1
|
||||
+DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE # -D_CURSES_LIB=1
|
||||
KNETFILE_O= knetfile.o
|
||||
LOBJS= bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o bam_index.o \
|
||||
bam_pileup.o bam_lpileup.o bam_md.o razf.o faidx.o bedidx.o \
|
||||
@@ -15,7 +15,7 @@ PROG= samtools
|
||||
INCLUDES= -I.
|
||||
SUBDIRS= . bcftools misc
|
||||
LIBPATH=
|
||||
-LIBCURSES= -lcurses # -lXCurses
|
||||
+LIBCURSES= # -lcurses # -lXCurses
|
||||
|
||||
.SUFFIXES:.c .o
|
||||
.PHONY: all lib
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, fetchurl, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "samtools";
|
||||
version = "0.1.19";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/samtools/${pname}-${version}.tar.bz2";
|
||||
sha256 = "d080c9d356e5f0ad334007e4461cbcee3c4ca97b8a7a5a48c44883cf9dee63d4";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./samtools-0.1.19-no-curses.patch
|
||||
];
|
||||
|
||||
buildInputs = [ zlib ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/share/man
|
||||
|
||||
cp samtools $out/bin
|
||||
cp samtools.1 $out/share/man
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tools for manipulating SAM/BAM/CRAM format";
|
||||
license = licenses.mit;
|
||||
homepage = "http://samtools.sourceforge.net/";
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.unode ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue