2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-10-07 09:15:18 +00:00
|
|
|
, libpng
|
|
|
|
, libuuid
|
|
|
|
, zlib
|
|
|
|
, bzip2
|
2021-04-05 15:23:46 +00:00
|
|
|
, xz
|
2020-10-07 09:15:18 +00:00
|
|
|
, openssl
|
|
|
|
, curl
|
|
|
|
, libmysqlclient
|
|
|
|
, bash
|
|
|
|
, fetchFromGitHub
|
|
|
|
, which
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "kent";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "466";
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ucscGenomeBrowser";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}_base";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-zoDZ+8G0SHKfWmkXBqp+WSjQXtmkcTIZjrjPhUIJw1c=";
|
2020-10-07 09:15:18 +00:00
|
|
|
};
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
buildInputs = [ libpng libuuid zlib bzip2 xz openssl curl libmysqlclient ];
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
2020-10-07 09:15:18 +00:00
|
|
|
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 = ''
|
2023-04-29 16:46:19 +00:00
|
|
|
runHook preBuild
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
export MACHTYPE=$(uname -m)
|
|
|
|
export CFLAGS="-fPIC"
|
|
|
|
export MYSQLINC=$(mysql_config --include | sed -e 's/^-I//g')
|
|
|
|
export MYSQLLIBS=$(mysql_config --libs)
|
2023-05-24 13:37:59 +00:00
|
|
|
export HOME=$TMPDIR
|
|
|
|
export DESTBINDIR=$HOME/bin
|
|
|
|
|
|
|
|
mkdir -p $HOME/lib $HOME/bin/x86_64
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
cd ./src
|
|
|
|
chmod +x ./checkUmask.sh
|
|
|
|
./checkUmask.sh
|
|
|
|
|
|
|
|
make libs
|
|
|
|
cd jkOwnLib
|
|
|
|
make
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
cp ../lib/x86_64/jkOwnLib.a $HOME/lib
|
|
|
|
cp ../lib/x86_64/jkweb.a $HOME/lib
|
|
|
|
cp -r ../inc $HOME/
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
cd ../utils
|
|
|
|
make
|
2023-04-29 16:46:19 +00:00
|
|
|
|
|
|
|
runHook postBuild
|
2020-10-07 09:15:18 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2023-04-29 16:46:19 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
mkdir -p $out/bin $out/lib $out/inc
|
|
|
|
cp $HOME/lib/jkOwnLib.a $out/lib
|
|
|
|
cp $HOME/lib/jkweb.a $out/lib
|
|
|
|
cp $HOME/bin/x86_64/* $out/bin
|
|
|
|
cp -r $HOME/inc/* $out/inc/
|
2023-04-29 16:46:19 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2020-10-07 09:15:18 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-10-07 09:15:18 +00:00
|
|
|
description = "UCSC Genome Bioinformatics Group's suite of biological analysis tools, i.e. the kent utilities";
|
2023-04-29 16:46:19 +00:00
|
|
|
homepage = "http://genome.ucsc.edu";
|
|
|
|
changelog = "https://github.com/ucscGenomeBrowser/kent/releases/tag/v${version}_base";
|
2020-10-07 09:15:18 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ scalavision ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|