about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libcacard
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libcacard')
-rw-r--r--nixpkgs/pkgs/development/libraries/libcacard/default.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libcacard/default.nix b/nixpkgs/pkgs/development/libraries/libcacard/default.nix
new file mode 100644
index 000000000000..1ab5b428f57a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcacard/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, pkg-config, glib, nss }:
+
+stdenv.mkDerivation rec {
+  pname = "libcacard";
+  version = "2.8.1";
+
+  src = fetchurl {
+    url = "https://www.spice-space.org/download/libcacard/${pname}-${version}.tar.xz";
+    sha256 = "sha256-+79N6Mt9tb3/XstnL/Db5pOfufNEuQDVG6YpUymjMuc=";
+  };
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    sed -i '/--version-script/d' Makefile.in
+    sed -i 's/^vflag = .*$/vflag = ""/' meson.build
+  '';
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glib nss ];
+
+  meta = with lib; {
+    description = "Smart card emulation library";
+    homepage = "https://gitlab.freedesktop.org/spice/libcacard";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ yana ];
+    platforms = platforms.unix;
+  };
+}