nixpkgs/pkgs/by-name/ke/kent/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

97 lines
1.9 KiB
Nix

{
lib,
stdenv,
libpng,
libuuid,
zlib,
bzip2,
xz,
openssl,
curl,
libmysqlclient,
bash,
fetchFromGitHub,
which,
}:
stdenv.mkDerivation rec {
pname = "kent";
version = "468";
src = fetchFromGitHub {
owner = "ucscGenomeBrowser";
repo = pname;
rev = "v${version}_base";
hash = "sha256-OM/noraW2X8WV5wqWEFiI5/JPOBmsp0fTeDdcZoXxAA=";
};
buildInputs = [
libpng
libuuid
zlib
bzip2
xz
openssl
curl
libmysqlclient
];
postPatch = ''
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 = ''
runHook preBuild
export MACHTYPE=$(uname -m)
export CFLAGS="-fPIC"
export MYSQLINC=$(mysql_config --include | sed -e 's/^-I//g')
export MYSQLLIBS=$(mysql_config --libs)
export HOME=$TMPDIR
export DESTBINDIR=$HOME/bin
mkdir -p $HOME/lib $HOME/bin/x86_64
cd ./src
chmod +x ./checkUmask.sh
./checkUmask.sh
make libs
cd jkOwnLib
make
cp ../lib/x86_64/jkOwnLib.a $HOME/lib
cp ../lib/x86_64/jkweb.a $HOME/lib
cp -r ../inc $HOME/
cd ../utils
make
runHook postBuild
'';
installPhase = ''
runHook preInstall
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/
runHook postInstall
'';
meta = with lib; {
description = "UCSC Genome Bioinformatics Group's suite of biological analysis tools, i.e. the kent utilities";
homepage = "http://genome.ucsc.edu";
changelog = "https://github.com/ucscGenomeBrowser/kent/releases/tag/v${version}_base";
license = licenses.unfree;
maintainers = with maintainers; [ scalavision ];
platforms = platforms.linux;
};
}