From 987cafe5e041489ef530b4f8c55d0d5080e1de3e Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Thu, 6 Apr 2017 23:35:49 -0400 Subject: [PATCH] vscode: Add libxkbfile to rpath Otherwise vscode complains about it. --- pkgs/applications/editors/vscode/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/vscode/default.nix b/pkgs/applications/editors/vscode/default.nix index a2854208a493..b6734d09d0e7 100644 --- a/pkgs/applications/editors/vscode/default.nix +++ b/pkgs/applications/editors/vscode/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, callPackage, fetchurl, unzip, atomEnv, makeDesktopItem, - makeWrapper, libXScrnSaver }: + makeWrapper, libXScrnSaver, libxkbfile }: let version = "1.11.1"; @@ -19,6 +19,13 @@ let 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 stdenv.mkDerivation rec { name = "vscode-${version}"; @@ -41,7 +48,7 @@ in buildInputs = if stdenv.system == "x86_64-darwin" then [ unzip makeWrapper libXScrnSaver ] - else [ makeWrapper libXScrnSaver ]; + else [ makeWrapper libXScrnSaver libxkbfile ]; installPhase = if stdenv.system == "x86_64-darwin" then '' @@ -63,7 +70,7 @@ in postFixup = lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") '' patchelf \ --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 '';