mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-10 15:04:44 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
86 lines
1.9 KiB
Nix
86 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;
|
|
};
|
|
}
|