kent: use finalAttrs and tag and writableTmpDirAsHomeHook

kyehn bf210e08 27070759

+9 -7
+9 -7
pkgs/by-name/ke/kent/package.nix
··· 1 1 { 2 2 lib, 3 3 stdenv, 4 + writableTmpDirAsHomeHook, 4 5 libpng, 5 6 libuuid, 6 7 zlib, ··· 16 17 jq, 17 18 nix-update, 18 19 }: 19 - stdenv.mkDerivation rec { 20 + stdenv.mkDerivation (finalAttrs: { 20 21 pname = "kent"; 21 22 version = "486"; 22 23 23 24 src = fetchFromGitHub { 24 25 owner = "ucscGenomeBrowser"; 25 26 repo = "kent"; 26 - rev = "v${version}_base"; 27 + tag = "v${finalAttrs.version}_base"; 27 28 hash = "sha256-NffQ04+5rMtG/VI7YFK4Ff39DDhdh9Wlc0i1iVbg8Js="; 28 29 }; 30 + 31 + nativeBuildInputs = [ writableTmpDirAsHomeHook ]; 29 32 30 33 buildInputs = [ 31 34 libpng ··· 40 43 41 44 postPatch = '' 42 45 substituteInPlace ./src/checkUmask.sh \ 43 - --replace "/bin/bash" "${bash}/bin/bash" 46 + --replace-fail "/bin/bash" "${bash}/bin/bash" 44 47 45 48 substituteInPlace ./src/hg/sqlEnvTest.sh \ 46 - --replace "which mysql_config" "${which}/bin/which ${libmysqlclient}/bin/mysql_config" 49 + --replace-fail "which mysql_config" "${which}/bin/which ${libmysqlclient}/bin/mysql_config" 47 50 ''; 48 51 49 52 buildPhase = '' ··· 53 56 export CFLAGS="-fPIC" 54 57 export MYSQLINC=$(mysql_config --include | sed -e 's/^-I//g') 55 58 export MYSQLLIBS=$(mysql_config --libs) 56 - export HOME=$TMPDIR 57 59 export DESTBINDIR=$HOME/bin 58 60 59 61 mkdir -p $HOME/lib $HOME/bin/${stdenv.hostPlatform.parsed.cpu.name} ··· 96 98 meta = { 97 99 description = "UCSC Genome Bioinformatics Group's suite of biological analysis tools, i.e. the kent utilities"; 98 100 homepage = "http://genome.ucsc.edu"; 99 - changelog = "https://github.com/ucscGenomeBrowser/kent/releases/tag/v${version}_base"; 101 + changelog = "https://github.com/ucscGenomeBrowser/kent/releases/tag/v${finalAttrs.version}_base"; 100 102 license = lib.licenses.unfree; 101 103 maintainers = with lib.maintainers; [ scalavision ]; 102 104 platforms = lib.platforms.linux; 103 105 }; 104 - } 106 + })