Merge pull request #261616 from mimame/fix-coursier

coursier: Fix LD path for libz.so.1

authored by

Weijia Wang and committed by
GitHub
a63c5083 964a525d

+18 -4
+18 -4
pkgs/development/tools/coursier/default.nix
··· 1 { lib, stdenv, fetchurl, makeWrapper, jre, writeScript, common-updater-scripts 2 - , coreutils, git, gnused, nix, nixfmt }: 3 4 stdenv.mkDerivation rec { 5 pname = "coursier"; 6 version = "2.1.7"; 7 8 src = fetchurl { 9 url = "https://github.com/coursier/coursier/releases/download/v${version}/coursier"; 10 - sha256 = "aih4gkfSFTyZtw61NfB2JcNjfmxYWi1kWNGooI+110E="; 11 }; 12 13 nativeBuildInputs = [ makeWrapper ]; 14 15 - buildCommand = '' 16 install -Dm555 $src $out/bin/cs 17 patchShebangs $out/bin/cs 18 - wrapProgram $out/bin/cs --prefix PATH ":" ${jre}/bin 19 ''; 20 21 passthru.updateScript = writeScript "update.sh" '' ··· 38 description = "Scala library to fetch dependencies from Maven / Ivy repositories"; 39 license = licenses.asl20; 40 maintainers = with maintainers; [ adelbertc nequissimus ]; 41 }; 42 }
··· 1 { lib, stdenv, fetchurl, makeWrapper, jre, writeScript, common-updater-scripts 2 + , coreutils, git, gnused, nix, zlib }: 3 4 + let 5 + libPath = lib.makeLibraryPath [ 6 + zlib # libz.so.1 7 + ]; 8 + in 9 stdenv.mkDerivation rec { 10 pname = "coursier"; 11 version = "2.1.7"; 12 13 src = fetchurl { 14 url = "https://github.com/coursier/coursier/releases/download/v${version}/coursier"; 15 + hash = "sha256-aih4gkfSFTyZtw61NfB2JcNjfmxYWi1kWNGooI+110E="; 16 }; 17 + 18 + dontUnpack = true; 19 20 nativeBuildInputs = [ makeWrapper ]; 21 22 + installPhase = '' 23 + runHook preInstall 24 + 25 install -Dm555 $src $out/bin/cs 26 patchShebangs $out/bin/cs 27 + wrapProgram $out/bin/cs \ 28 + --prefix PATH ":" ${lib.makeBinPath [ jre ]} \ 29 + --prefix LD_LIBRARY_PATH ":" ${libPath} 30 + 31 + runHook postInstall 32 ''; 33 34 passthru.updateScript = writeScript "update.sh" '' ··· 51 description = "Scala library to fetch dependencies from Maven / Ivy repositories"; 52 license = licenses.asl20; 53 maintainers = with maintainers; [ adelbertc nequissimus ]; 54 + platforms = platforms.all; 55 }; 56 }