mirror of
https://git.lgmrszd.xyz/Lgmrszd/nix-cfg.git
synced 2025-12-13 23:28:20 +01:00
laptop: link jdks in /opt/java
This commit is contained in:
parent
5543cf819f
commit
d6a6f51490
4 changed files with 39 additions and 12 deletions
|
|
@ -5,7 +5,6 @@
|
|||
inputpkg,
|
||||
pkgsuffix,
|
||||
libraries,
|
||||
extrapathpkgs
|
||||
}: with pkgs; let
|
||||
name = "${inputpkg.pname}-${pkgsuffix}";
|
||||
in stdenv.mkDerivation {
|
||||
|
|
@ -17,8 +16,7 @@
|
|||
mkdir -p $out/share/applications
|
||||
cp ${inputpkg}/share/applications/${inputpkg.pname}.desktop $out/share/applications/${name}.desktop
|
||||
makeWrapper ${inputpkg}/bin/${inputpkg.pname} $out/bin/${name} \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath libraries}" \
|
||||
--prefix PATH : "${lib.makeBinPath extrapathpkgs}"
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath libraries}"
|
||||
substituteInPlace $out/share/applications/${name}.desktop \
|
||||
--replace-fail "=${inputpkg.pname}" "=${name}"
|
||||
sed -i -E "s/^Name=(.*)/Name=\1 (${pkgsuffix})/g" "$out/share/applications/${name}.desktop"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue