at 23.11-beta 36 lines 1.2 kB view raw
1{ lib, stdenv, fetchurl, fetchpatch, cmake, minizip, pcsclite, opensc, openssl 2, xercesc, xml-security-c, pkg-config, xsd, zlib, xalanc, xxd }: 3 4stdenv.mkDerivation rec { 5 version = "3.16.0"; 6 pname = "libdigidocpp"; 7 8 src = fetchurl { 9 url = "https://github.com/open-eid/libdigidocpp/releases/download/v${version}/libdigidocpp-${version}.tar.gz"; 10 hash = "sha256-XgObeVQJ2X7hNIelGK55RTtkKvU6D+RkLMc24/PZCzY="; 11 }; 12 13 nativeBuildInputs = [ cmake pkg-config xxd ]; 14 15 buildInputs = [ 16 minizip pcsclite opensc openssl xercesc 17 xml-security-c xsd zlib xalanc 18 ]; 19 20 outputs = [ "out" "lib" "dev" "bin" ]; 21 22 # libdigidocpp.so's `PKCS11Signer::PKCS11Signer()` dlopen()s "opensc-pkcs11.so" 23 # itself, so add OpenSC to its DT_RUNPATH after the fixupPhase shrinked it. 24 # https://github.com/open-eid/cmake/pull/35 might be an alternative. 25 postFixup = '' 26 patchelf --add-rpath ${opensc}/lib/pkcs11 $lib/lib/libdigidocpp.so 27 ''; 28 29 meta = with lib; { 30 description = "Library for creating DigiDoc signature files"; 31 homepage = "https://www.id.ee/"; 32 license = licenses.lgpl21Plus; 33 platforms = platforms.linux; 34 maintainers = [ maintainers.jagajaga ]; 35 }; 36}