3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #48282 from transumption/201810/qemu-smartcard

qemu: enable smartcard support
This commit is contained in:
Yegor Timoshenko 2018-10-16 11:31:36 +00:00 committed by GitHub
commit e31942c71e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 3 deletions

View file

@ -10,6 +10,7 @@
, sdlSupport ? !stdenv.isDarwin, SDL2
, gtkSupport ? !stdenv.isDarwin && !xenSupport, gtk3, gettext, gnome3
, vncSupport ? true, libjpeg, libpng
, smartcardSupport ? true, libcacard
, spiceSupport ? !stdenv.isDarwin, spice, spice-protocol
, usbredirSupport ? spiceSupport, usbredir
, xenSupport ? false, xen
@ -58,6 +59,7 @@ stdenv.mkDerivation rec {
++ optionals sdlSupport [ SDL2 ]
++ optionals gtkSupport [ gtk3 gettext gnome3.vte ]
++ optionals vncSupport [ libjpeg libpng ]
++ optionals smartcardSupport [ libcacard ]
++ optionals spiceSupport [ spice-protocol spice ]
++ optionals usbredirSupport [ usbredir ]
++ optionals stdenv.isLinux [ alsaLib libaio libcap_ng libcap attr ]
@ -108,6 +110,7 @@ stdenv.mkDerivation rec {
++ optional stdenv.isDarwin "--cpu=x86_64"
++ optional numaSupport "--enable-numa"
++ optional seccompSupport "--enable-seccomp"
++ optional smartcardSupport "--enable-smartcard"
++ optional spiceSupport "--enable-spice"
++ optional usbredirSupport "--enable-usb-redir"
++ optional hostCpuOnly "--target-list=${hostCpuTargets}"

View file

@ -0,0 +1,22 @@
{ stdenv, fetchurl, pkgconfig, glib, nss }:
stdenv.mkDerivation rec {
name = "libcacard-${version}";
version = "2.6.1";
src = fetchurl {
url = "https://www.spice-space.org/download/libcacard/${name}.tar.xz";
sha256 = "1w6y0kiakhg7dgyf8yqpm4jj6jiv17zhy9lp3d7z32q1pniccxk2";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ glib nss ];
meta = with stdenv.lib; {
description = "Smart card emulation library";
homepage = https://gitlab.freedesktop.org/spice/libcacard;
license = licenses.lgpl21;
maintainers = with maintainers; [ yegortimoshenko ];
platforms = platforms.unix;
};
}

View file

@ -1,7 +1,7 @@
{ stdenv, fetchurl, pkgconfig, pixman, celt, alsaLib
, openssl, libXrandr, libXfixes, libXext, libXrender, libXinerama
, libjpeg, zlib, spice-protocol, python, pyparsing, glib, cyrus_sasl
, lz4 }:
, libcacard, lz4 }:
with stdenv.lib;
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
buildInputs = [ pixman celt alsaLib openssl libjpeg zlib
libXrandr libXfixes libXrender libXext libXinerama
python pyparsing glib cyrus_sasl lz4 ];
python pyparsing glib cyrus_sasl libcacard lz4 ];
nativeBuildInputs = [ pkgconfig spice-protocol ];
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
configureFlags = [
"--with-sasl"
"--disable-smartcard"
"--enable-smartcard"
"--enable-client"
"--enable-lz4"
];

View file

@ -10305,6 +10305,8 @@ with pkgs;
inherit (xorg) libX11 libXext;
};
libcacard = callPackage ../development/libraries/libcacard { };
libcanberra = callPackage ../development/libraries/libcanberra {
inherit (darwin.apple_sdk.frameworks) CoreServices;
};