openct: unbreak, modernize

awwpotato 0f9261e0 9ff03ab0

+24 -13
+24 -13
pkgs/by-name/op/openct/package.nix
··· 3 3 stdenv, 4 4 fetchFromGitHub, 5 5 autoreconfHook, 6 + doxygen, 7 + libxslt, 6 8 pkg-config, 7 9 pcsclite, 10 + libtool, 8 11 libusb-compat-0_1, 9 - doxygen, 10 - libxslt, 11 12 }: 12 13 13 - stdenv.mkDerivation rec { 14 + stdenv.mkDerivation (finalAttrs: { 14 15 pname = "openct"; 15 16 version = "0.6.20"; 16 17 17 18 src = fetchFromGitHub { 18 19 owner = "OpenSC"; 19 20 repo = "openct"; 20 - rev = "${pname}-${version}"; 21 - sha256 = "09wxq0jxdxhci3zr7jd3zcxjkl3j0r1v00k3q8gqrg9gighh8nk2"; 21 + rev = "openct-${finalAttrs.version}"; 22 + hash = "sha256-YloE4YsvvYwfwmMCsEMGctApO/ujyZP/iAz21iXAnSc="; 22 23 }; 23 24 24 25 postPatch = '' 25 - sed -i 's,$(DESTDIR),$(out),g' etc/Makefile.am 26 + substituteInPlace etc/Makefile.am \ 27 + --replace-fail "DESTDIR" "out" 26 28 ''; 29 + 30 + # unbreak build on GCC 14, remove when https://github.com/OpenSC/openct/pull/12 31 + # (or equivalent) is merged and released 32 + env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; 27 33 28 34 configureFlags = [ 29 35 "--enable-api-doc" ··· 35 41 36 42 nativeBuildInputs = [ 37 43 autoreconfHook 44 + doxygen 45 + libxslt # xsltproc 38 46 pkg-config 39 47 ]; 48 + 40 49 buildInputs = [ 41 50 pcsclite 51 + libtool # libltdl 42 52 libusb-compat-0_1 43 - doxygen 44 - libxslt 45 53 ]; 46 54 55 + strictDeps = true; 56 + 47 57 preInstall = '' 48 58 mkdir -p $out/etc 49 59 ''; 50 60 51 - meta = with lib; { 52 - broken = stdenv.hostPlatform.isDarwin; 61 + meta = { 53 62 homepage = "https://github.com/OpenSC/openct/"; 54 - license = licenses.lgpl21; 55 63 description = "Drivers for several smart card readers"; 56 - platforms = platforms.all; 64 + license = lib.licenses.lgpl21; 65 + maintainers = [ ]; 66 + platforms = lib.platforms.all; 67 + broken = stdenv.hostPlatform.isDarwin; 57 68 }; 58 - } 69 + })