From a6f124f57b0fc216f5c4f2f8ff141fc292da5a40 Mon Sep 17 00:00:00 2001 From: Scalavision Date: Thu, 1 Oct 2020 19:27:40 +0200 Subject: [PATCH] kent: init at 404 --- .../science/biology/kent/default.nix | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 pkgs/applications/science/biology/kent/default.nix diff --git a/pkgs/applications/science/biology/kent/default.nix b/pkgs/applications/science/biology/kent/default.nix new file mode 100644 index 000000000000..2ca5ad191d92 --- /dev/null +++ b/pkgs/applications/science/biology/kent/default.nix @@ -0,0 +1,75 @@ +{ stdenv +, libpng +, libuuid +, zlib +, bzip2 +, lzma +, openssl +, curl +, libmysqlclient +, bash +, fetchFromGitHub +, which +}: +stdenv.mkDerivation rec { + pname = "kent"; + version = "404"; + + src = fetchFromGitHub { + owner = "ucscGenomeBrowser"; + repo = pname; + rev = "v${version}_base"; + sha256 = "0l5lmqqc6sqkf4hyk3z4825ly0vdlj5xdfad6zd0708cb1v81nbx"; + }; + + buildInputs = [ libpng libuuid zlib bzip2 lzma openssl curl libmysqlclient ]; + + patchPhase = '' + substituteInPlace ./src/checkUmask.sh \ + --replace "/bin/bash" "${bash}/bin/bash" + + substituteInPlace ./src/hg/sqlEnvTest.sh \ + --replace "which mysql_config" "${which}/bin/which ${libmysqlclient}/bin/mysql_config" + ''; + + buildPhase = '' + export MACHTYPE=$(uname -m) + export CFLAGS="-fPIC" + export MYSQLINC=$(mysql_config --include | sed -e 's/^-I//g') + export MYSQLLIBS=$(mysql_config --libs) + export DESTBINDIR=$NIX_BUILD_TOP/bin + export HOME=$NIX_BUILD_TOP + + cd ./src + chmod +x ./checkUmask.sh + ./checkUmask.sh + + mkdir -p $NIX_BUILD_TOP/lib + mkdir -p $NIX_BUILD_TOP/bin/x86_64 + + make libs + cd jkOwnLib + make + + cp ../lib/x86_64/jkOwnLib.a $NIX_BUILD_TOP/lib + cp ../lib/x86_64/jkweb.a $NIX_BUILD_TOP/lib + + cd ../utils + make + ''; + + installPhase = '' + mkdir -p $out/bin + mkdir -p $out/lib + cp $NIX_BUILD_TOP/lib/jkOwnLib.a $out/lib + cp $NIX_BUILD_TOP/lib/jkweb.a $out/lib + cp $NIX_BUILD_TOP/bin/x86_64/* $out/bin + ''; + + meta = with stdenv.lib; { + description = "UCSC Genome Bioinformatics Group's suite of biological analysis tools, i.e. the kent utilities"; + license = licenses.unfree; + maintainers = with maintainers; [ scalavision ]; + platforms = platforms.linux; + }; +}