nixpkgs/pkgs/by-name/op/openct/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

43 lines
982 B
Nix

{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, pcsclite, libusb-compat-0_1
, doxygen, libxslt
}:
stdenv.mkDerivation rec {
pname = "openct";
version = "0.6.20";
src = fetchFromGitHub {
owner = "OpenSC";
repo = "openct";
rev = "${pname}-${version}";
sha256 = "09wxq0jxdxhci3zr7jd3zcxjkl3j0r1v00k3q8gqrg9gighh8nk2";
};
postPatch = ''
sed -i 's,$(DESTDIR),$(out),g' etc/Makefile.am
'';
configureFlags = [
"--enable-api-doc"
"--enable-usb"
"--enable-pcsc"
"--localstatedir=/var"
"--sysconfdir=/etc"
];
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ pcsclite libusb-compat-0_1 doxygen libxslt ];
preInstall = ''
mkdir -p $out/etc
'';
meta = with lib; {
broken = stdenv.hostPlatform.isDarwin;
homepage = "https://github.com/OpenSC/openct/";
license = licenses.lgpl21;
description = "Drivers for several smart card readers";
platforms = platforms.all;
};
}