mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 22:32:58 +03:00
vscode: Add libxkbfile to rpath
Otherwise vscode complains about it.
This commit is contained in:
parent
4a08528b4a
commit
987cafe5e0
@ -1,5 +1,5 @@
|
|||||||
{ stdenv, lib, callPackage, fetchurl, unzip, atomEnv, makeDesktopItem,
|
{ stdenv, lib, callPackage, fetchurl, unzip, atomEnv, makeDesktopItem,
|
||||||
makeWrapper, libXScrnSaver }:
|
makeWrapper, libXScrnSaver, libxkbfile }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "1.11.1";
|
version = "1.11.1";
|
||||||
@ -19,6 +19,13 @@ let
|
|||||||
|
|
||||||
archive_fmt = if stdenv.system == "x86_64-darwin" then "zip" else "tar.gz";
|
archive_fmt = if stdenv.system == "x86_64-darwin" then "zip" else "tar.gz";
|
||||||
|
|
||||||
|
rpath = lib.concatStringsSep ":" [
|
||||||
|
atomEnv.libPath
|
||||||
|
"${lib.makeLibraryPath [libXScrnSaver]}/libXss.so.1"
|
||||||
|
"${lib.makeLibraryPath [libxkbfile]}/libxkbfile.so.1"
|
||||||
|
"$out/lib/vscode"
|
||||||
|
];
|
||||||
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "vscode-${version}";
|
name = "vscode-${version}";
|
||||||
@ -41,7 +48,7 @@ in
|
|||||||
|
|
||||||
buildInputs = if stdenv.system == "x86_64-darwin"
|
buildInputs = if stdenv.system == "x86_64-darwin"
|
||||||
then [ unzip makeWrapper libXScrnSaver ]
|
then [ unzip makeWrapper libXScrnSaver ]
|
||||||
else [ makeWrapper libXScrnSaver ];
|
else [ makeWrapper libXScrnSaver libxkbfile ];
|
||||||
|
|
||||||
installPhase =
|
installPhase =
|
||||||
if stdenv.system == "x86_64-darwin" then ''
|
if stdenv.system == "x86_64-darwin" then ''
|
||||||
@ -63,7 +70,7 @@ in
|
|||||||
postFixup = lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") ''
|
postFixup = lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") ''
|
||||||
patchelf \
|
patchelf \
|
||||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||||
--set-rpath "${atomEnv.libPath}:${stdenv.lib.makeLibraryPath [libXScrnSaver]}/libXss.so.1:$out/lib/vscode" \
|
--set-rpath "${rpath}" \
|
||||||
$out/lib/vscode/code
|
$out/lib/vscode/code
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user