git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #48282 from transumption/201810/qemu-smartcard

qemu: enable smartcard support

commite31942c71eef88a7188acc36b00c2a916d8774e6 authorYegor Timoshenko <yegortimoshenko@riseup.net> dateTue 16 Oct 2018, 11:31 (8 years ago) parenta65f0b302602b2
4 files changed+30−3
pkgs/applications/virtualization/qemu/default.nix+3 pkgs/development/libraries/libcacard/default.nix+22 pkgs/development/libraries/spice/default.nix+3−3 pkgs/top-level/all-packages.nix+2
pkgs/applications/virtualization/qemu/default.nix+3
@@ -10,6 +10,7 @@
1010, sdlSupport ? !stdenv.isDarwin, SDL2
1111, gtkSupport ? !stdenv.isDarwin && !xenSupport, gtk3, gettext, gnome3
1212, vncSupport ? true, libjpeg, libpng
13+, smartcardSupport ? true, libcacard
1314, spiceSupport ? !stdenv.isDarwin, spice, spice-protocol
1415, usbredirSupport ? spiceSupport, usbredir
1516, xenSupport ? false, xen
@@ -58,6 +59,7 @@ stdenv.mkDerivation rec {
5859 ++ optionals sdlSupport [ SDL2 ]
5960 ++ optionals gtkSupport [ gtk3 gettext gnome3.vte ]
6061 ++ optionals vncSupport [ libjpeg libpng ]
62+ ++ optionals smartcardSupport [ libcacard ]
6163 ++ optionals spiceSupport [ spice-protocol spice ]
6264 ++ optionals usbredirSupport [ usbredir ]
6365 ++ optionals stdenv.isLinux [ alsaLib libaio libcap_ng libcap attr ]
@@ -108,6 +110,7 @@ stdenv.mkDerivation rec {
108110 ++ optional stdenv.isDarwin "--cpu=x86_64"
109111 ++ optional numaSupport "--enable-numa"
110112 ++ optional seccompSupport "--enable-seccomp"
113+ ++ optional smartcardSupport "--enable-smartcard"
111114 ++ optional spiceSupport "--enable-spice"
112115 ++ optional usbredirSupport "--enable-usb-redir"
113116 ++ optional hostCpuOnly "--target-list=${hostCpuTargets}"
pkgs/development/libraries/libcacard/default.nixnew file+22
@@ -0,0 +1,22 @@
1+{ stdenv, fetchurl, pkgconfig, glib, nss }:
2+
3+stdenv.mkDerivation rec {
4+ name = "libcacard-${version}";
5+ version = "2.6.1";
6+
7+ src = fetchurl {
8+ url = "https://www.spice-space.org/download/libcacard/${name}.tar.xz";
9+ sha256 = "1w6y0kiakhg7dgyf8yqpm4jj6jiv17zhy9lp3d7z32q1pniccxk2";
10+ };
11+
12+ nativeBuildInputs = [ pkgconfig ];
13+ buildInputs = [ glib nss ];
14+
15+ meta = with stdenv.lib; {
16+ description = "Smart card emulation library";
17+ homepage = https://gitlab.freedesktop.org/spice/libcacard;
18+ license = licenses.lgpl21;
19+ maintainers = with maintainers; [ yegortimoshenko ];
20+ platforms = platforms.unix;
21+ };
22+}
pkgs/development/libraries/spice/default.nix+3−3
@@ -1,7 +1,7 @@
11{ stdenv, fetchurl, pkgconfig, pixman, celt, alsaLib
22, openssl, libXrandr, libXfixes, libXext, libXrender, libXinerama
33, libjpeg, zlib, spice-protocol, python, pyparsing, glib, cyrus_sasl
4−, lz4 }:
4+, libcacard, lz4 }:
55
66with stdenv.lib;
77
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
1515
1616 buildInputs = [ pixman celt alsaLib openssl libjpeg zlib
1717 libXrandr libXfixes libXrender libXext libXinerama
18− python pyparsing glib cyrus_sasl lz4 ];
18+ python pyparsing glib cyrus_sasl libcacard lz4 ];
1919
2020 nativeBuildInputs = [ pkgconfig spice-protocol ];
2121
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
2323
2424 configureFlags = [
2525 "--with-sasl"
26− "--disable-smartcard"
26+ "--enable-smartcard"
2727 "--enable-client"
2828 "--enable-lz4"
2929 ];
pkgs/top-level/all-packages.nix+2
@@ -10305,6 +10305,8 @@ with pkgs;
1030510305 inherit (xorg) libX11 libXext;
1030610306 };
1030710307
10308+ libcacard = callPackage ../development/libraries/libcacard { };
10309+
1030810310 libcanberra = callPackage ../development/libraries/libcanberra {
1030910311 inherit (darwin.apple_sdk.frameworks) CoreServices;
1031010312 };