btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / li / libcacard / package.nix
blob1dd07a9d6ec2a1ac21f591fbb56773d3ffce9b5b
1 { lib, stdenv, fetchurl, pkg-config, glib, nss }:
3 stdenv.mkDerivation rec {
4   pname = "libcacard";
5   version = "2.8.1";
7   src = fetchurl {
8     url = "https://www.spice-space.org/download/libcacard/${pname}-${version}.tar.xz";
9     sha256 = "sha256-+79N6Mt9tb3/XstnL/Db5pOfufNEuQDVG6YpUymjMuc=";
10   };
12   postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
13     sed -i '/--version-script/d' Makefile.in
14     sed -i 's/^vflag = .*$/vflag = ""/' meson.build
15   '';
17   nativeBuildInputs = [ pkg-config ];
18   buildInputs = [ glib nss ];
20   meta = with lib; {
21     description = "Smart card emulation library";
22     homepage = "https://gitlab.freedesktop.org/spice/libcacard";
23     license = licenses.lgpl21;
24     maintainers = [ ];
25     platforms = platforms.unix;
26   };