git.iko.soy/typeable/nixpkgs
on master help sign in
gpshell: wrap with gppcscconnectionplugin

Fixes this: $ echo establish_context | gpshell establish_context establish_context failed with error 0xFFFFFFFFFFFFFFFF (libgppcscconnectionplugin.so.1.0.1: cannot open shared object file: No such file or directory) Have to use LD_LIBRARY_PATH instead of patchelf, because it's libglobalplatform.so.6 (from globalplatform package) that needs libgppcscconnectionplugin.so.1.0.1, not gpshell itself. And because RPATH doesn't "propagate" from one ELF to another, the library isn't found. One can argue that globalplatform should depend on gppcscconnectionplugin, but it touches on the still-unsolved "plugin" issue in Nix packaging, so leaving that alone.

commitb0d77698bfb18d435a99ff2ffe4ca807cb0f9002 authorBjørn Forsman <bjorn.forsman@gmail.com> dateSun 2 Oct 2016, 13:27 (10 years ago) parent1021797
1 file changed+8−2
pkgs/development/tools/misc/gpshell/default.nix+8−2
pkgs/development/tools/misc/gpshell/default.nix+8−2
@@ -1,4 +1,6 @@
1−{ stdenv, fetchurl, pkgconfig, globalplatform, pcsclite }:
1+{ stdenv, fetchurl, pkgconfig, globalplatform, pcsclite, gppcscconnectionplugin
2+, makeWrapper
3+}:
24
35stdenv.mkDerivation rec {
46 name = "gpshell-${version}";
@@ -9,7 +11,11 @@ stdenv.mkDerivation rec {
911 sha256 = "19a77zvyf2vazbv17185s4pynhylk2ky8vhl4i8pg9zww29sicqi";
1012 };
1113
12− buildInputs = [ pkgconfig globalplatform pcsclite ];
14+ buildInputs = [ pkgconfig globalplatform pcsclite makeWrapper ];
15+
16+ postFixup = ''
17+ wrapProgram "$out/bin/gpshell" --prefix LD_LIBRARY_PATH : "${gppcscconnectionplugin}/lib"
18+ '';
1319
1420 meta = with stdenv.lib; {
1521 homepage = https://sourceforge.net/p/globalplatform/wiki/Home/;