Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

opencryptoki: 3.2 -> 3.8.1

authored by Renaud and committed by GitHub f1ec44ec 2d8d35e3

+23 -20
+23 -20
pkgs/tools/security/opencryptoki/default.nix
··· 1 - { stdenv, fetchurl, openssl, trousers, automake, autoconf, libtool, bison, flex }: 1 + { stdenv, fetchFromGitHub, openssl, trousers, autoreconfHook, libtool, bison, flex }: 2 2 3 3 stdenv.mkDerivation rec { 4 - version = "3.2"; 5 4 name = "opencryptoki-${version}"; 5 + version = "3.8.1"; 6 6 7 - src = fetchurl { 8 - url = "mirror://sourceforge/opencryptoki/opencryptoki/v${version}/opencryptoki-v${version}.tgz"; 9 - sha256 = "06r6zp299vxdspl6k65myzgjv0bihg7kc500v7s4jd3mcrkngd6h"; 7 + src = fetchFromGitHub { 8 + owner = "opencryptoki"; 9 + repo = "opencryptoki"; 10 + rev = "v${version}"; 11 + sha256 = "1m618pjfzw18irmh6i4pfq1gvcxgyfh9ikjn33nrdj55v2l27g31"; 10 12 }; 11 13 12 - buildInputs = [ automake autoconf libtool openssl trousers bison flex ]; 14 + nativeBuildInputs = [ autoreconfHook libtool bison flex ]; 15 + buildInputs = [ openssl trousers ]; 13 16 14 - preConfigure = '' 15 - substituteInPlace configure.in --replace "chown" "true" 16 - substituteInPlace configure.in --replace "chgrp" "true" 17 - sh bootstrap.sh --prefix=$out 17 + postPatch = '' 18 + substituteInPlace configure.ac \ 19 + --replace "usermod" "true" \ 20 + --replace "groupadd" "true" \ 21 + --replace "chmod" "true" \ 22 + --replace "chgrp" "true" 23 + substituteInPlace usr/lib/Makefile.am --replace "DESTDIR" "out" 18 24 ''; 19 25 20 - configureFlags = [ "--disable-ccatok" "--disable-icatok" ]; 26 + configureFlags = [ 27 + "--prefix=$(out)" 28 + "--disable-ccatok" 29 + "--disable-icatok" 30 + ]; 21 31 22 - makeFlags = "DESTDIR=$(out)"; 23 - 24 - # work around the build script of opencryptoki 25 - postInstall = '' 26 - cp -r $out/$out/* $out 27 - rm -r $out/nix 28 - ''; 32 + enableParallelBuilding = true; 29 33 30 34 meta = with stdenv.lib; { 31 35 description = "PKCS#11 implementation for Linux"; 32 - homepage = http://opencryptoki.sourceforge.net/; 36 + homepage = https://github.com/opencryptoki/opencryptoki; 33 37 license = licenses.cpl10; 34 38 maintainers = [ maintainers.tstrobel ]; 35 39 platforms = platforms.unix; 36 40 }; 37 41 } 38 -