diff options
author | Miguel Madrid-MencĂa <miguel.madrid.mencia@gmail.com> | 2023-10-17 13:01:54 +0200 |
---|---|---|
committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2023-10-17 22:35:47 +0200 |
commit | 2bffcc4f2843c297febed82384d5c7bc616d53da (patch) | |
tree | 16f86f64b60272c387ea6f78f24bf2f59162699b | |
parent | d93b059c14e8233efdf808fd65538d93250f1a5d (diff) | |
download | nixpkgs-2bffcc4f2843c297febed82384d5c7bc616d53da.tar nixpkgs-2bffcc4f2843c297febed82384d5c7bc616d53da.tar.gz nixpkgs-2bffcc4f2843c297febed82384d5c7bc616d53da.tar.bz2 nixpkgs-2bffcc4f2843c297febed82384d5c7bc616d53da.tar.lz nixpkgs-2bffcc4f2843c297febed82384d5c7bc616d53da.tar.xz nixpkgs-2bffcc4f2843c297febed82384d5c7bc616d53da.tar.zst nixpkgs-2bffcc4f2843c297febed82384d5c7bc616d53da.zip |
coursier: Fix LD path for libz.so.1
-rw-r--r-- | pkgs/development/tools/coursier/default.nix | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/pkgs/development/tools/coursier/default.nix b/pkgs/development/tools/coursier/default.nix index f768064fbe8..61aec684a1e 100644 --- a/pkgs/development/tools/coursier/default.nix +++ b/pkgs/development/tools/coursier/default.nix @@ -1,21 +1,34 @@ { lib, stdenv, fetchurl, makeWrapper, jre, writeScript, common-updater-scripts -, coreutils, git, gnused, nix, nixfmt }: +, coreutils, git, gnused, nix, zlib }: +let + libPath = lib.makeLibraryPath [ + zlib # libz.so.1 + ]; +in stdenv.mkDerivation rec { pname = "coursier"; version = "2.1.7"; src = fetchurl { url = "https://github.com/coursier/coursier/releases/download/v${version}/coursier"; - sha256 = "aih4gkfSFTyZtw61NfB2JcNjfmxYWi1kWNGooI+110E="; + hash = "sha256-aih4gkfSFTyZtw61NfB2JcNjfmxYWi1kWNGooI+110E="; }; + dontUnpack = true; + nativeBuildInputs = [ makeWrapper ]; - buildCommand = '' + installPhase = '' + runHook preInstall + install -Dm555 $src $out/bin/cs patchShebangs $out/bin/cs - wrapProgram $out/bin/cs --prefix PATH ":" ${jre}/bin + wrapProgram $out/bin/cs \ + --prefix PATH ":" ${lib.makeBinPath [ jre ]} \ + --prefix LD_LIBRARY_PATH ":" ${libPath} + + runHook postInstall ''; passthru.updateScript = writeScript "update.sh" '' @@ -38,5 +51,6 @@ stdenv.mkDerivation rec { description = "Scala library to fetch dependencies from Maven / Ivy repositories"; license = licenses.asl20; maintainers = with maintainers; [ adelbertc nequissimus ]; + platforms = platforms.all; }; } |