Skip to content

Instantly share code, notes, and snippets.

@aszlig
Created July 5, 2015 09:12
Show Gist options
  • Save aszlig/f928665f6c1b2be69edb to your computer and use it in GitHub Desktop.
Save aszlig/f928665f6c1b2be69edb to your computer and use it in GitHub Desktop.
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "suisseid-pkcs11-${version}";
version = "1.0.4292";
src = fetchurl {
url = "http://update.swisssign.com/media/stick/repository/dists/unstable"
+ "/non-free/binary-amd64/suisseid-pkcs11_1.0.4292-1_amd64.deb";
sha256 = "05qp5k079796dfpj76pcdbl3r2m7g0wjp66i9siphzkdzci0gbr1";
};
unpackCmd = ''
ar p "$src" data.tar.xz | tar xJ
'';
buildPhase = let
rpaths = [ stdenv.cc.cc ];
in ''
for i in lib/*.so; do
patchelf --set-rpath "${stdenv.lib.makeLibraryPath rpaths}" "$i"
done
'';
dontStrip = true;
installPhase = ''
for i in lib/*.so; do
install -vD "$i" "$out/lib/$(basename "$i")"
done
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment