Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 16.09 38 lines 1.1 kB view raw
1{ stdenv, fetchurl, openssl, trousers, automake, autoconf, libtool, bison, flex }: 2 3stdenv.mkDerivation rec { 4 version = "3.2"; 5 name = "opencryptoki-${version}"; 6 7 src = fetchurl { 8 url = "mirror://sourceforge/opencryptoki/opencryptoki/v${version}/opencryptoki-v${version}.tgz"; 9 sha256 = "06r6zp299vxdspl6k65myzgjv0bihg7kc500v7s4jd3mcrkngd6h"; 10 }; 11 12 buildInputs = [ automake autoconf libtool openssl trousers bison flex ]; 13 14 preConfigure = '' 15 substituteInPlace configure.in --replace "chown" "true" 16 substituteInPlace configure.in --replace "chgrp" "true" 17 sh bootstrap.sh --prefix=$out 18 ''; 19 20 configureFlags = [ "--disable-ccatok" "--disable-icatok" ]; 21 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 ''; 29 30 meta = with stdenv.lib; { 31 description = "PKCS#11 implementation for Linux"; 32 homepage = http://opencryptoki.sourceforge.net/; 33 license = licenses.cpl10; 34 maintainers = [ maintainers.tstrobel ]; 35 platforms = platforms.unix; 36 }; 37} 38