1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

sratoolkit: build from source

This commit is contained in:
t4ccer 2024-07-10 13:32:26 -06:00
parent ac4f160f78
commit 35db6ff3e7
No known key found for this signature in database
GPG key ID: 19E5A2D8B1E43F19
3 changed files with 57 additions and 45 deletions

View file

@ -1,43 +0,0 @@
{ stdenv
, lib
, fetchurl
, autoPatchelfHook
, libidn
, zlib
, bzip2
}:
stdenv.mkDerivation (finalAttrs: {
pname = "sratoolkit";
version = "3.1.1";
src = fetchurl {
url = "https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/${finalAttrs.version}/sratoolkit.${finalAttrs.version}-ubuntu64.tar.gz";
hash = "sha256-tmjb+i6TBBdG0cMTaRJyrqS56lKykdevt51G3AU2dog=";
};
nativeBuildInputs = [
autoPatchelfHook
];
buildInputs = [
libidn
zlib
bzip2
stdenv.cc.cc.lib
];
sourceRoot = "sratoolkit.${finalAttrs.version}-ubuntu64/bin";
installPhase = ''
find -L . -executable -type f -! -name "*remote-fuser*" -exec install -m755 -D {} $out/bin/{} \;
'';
meta = with lib; {
homepage = "https://github.com/ncbi/sra-tools";
description = "SRA Toolkit and SDK from NCBI is a collection of tools and libraries for using data in the INSDC Sequence Read Archives";
license = licenses.ncbiPd;
maintainers = with maintainers; [ thyol ];
platforms = [ "x86_64-linux" ];
};
})

View file

@ -0,0 +1,57 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
python3,
bison,
flex,
libxml2,
openjdk,
ncbi-vdb,
mbedtls,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "sratoolkit";
# NOTE: When updating make sure to update ncbi-vdb as well for versions to match
version = "3.1.1";
src = fetchFromGitHub {
owner = "ncbi";
repo = "sra-tools";
rev = "refs/tags/${finalAttrs.version}";
hash = "sha256-WVPiAz3EFYuhBnl7BsEjJ2BTi1wAownEunVM4sdLaj8=";
};
cmakeFlags = [
"-DVDB_INCDIR=${ncbi-vdb}/include"
"-DVDB_LIBDIR=${ncbi-vdb}/lib"
];
buildInputs = [
ncbi-vdb
libxml2
mbedtls
];
nativeBuildInputs = [
cmake
python3
bison
flex
openjdk
];
meta = {
homepage = "https://github.com/ncbi/sra-tools";
description = "Collection of tools and libraries for using data in the INSDC Sequence Read Archives";
license = lib.licenses.ncbiPd;
maintainers = with lib.maintainers; [
thyol
t4ccer
];
platforms = lib.platforms.unix;
};
})

View file

@ -17582,8 +17582,6 @@ with pkgs;
srandrd = callPackage ../tools/X11/srandrd { };
sratoolkit = callPackage ../applications/science/biology/sratoolkit { };
srecord = callPackage ../development/tools/misc/srecord { };
srelay = callPackage ../tools/networking/srelay { };