diff options
author | Renaud <c0bw3b@users.noreply.github.com> | 2017-11-12 22:39:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-12 22:39:37 +0100 |
commit | f1ec44ec943ddf49c8510d06f714cdffe8d1deaf (patch) | |
tree | 833e869763a8ac3278af14080befd5bf5b74f85b /pkgs/tools/security/opencryptoki | |
parent | 2d8d35e342f947572e6151673dc6dfdb7a4d5cff (diff) |
opencryptoki: 3.2 -> 3.8.1
Diffstat (limited to 'pkgs/tools/security/opencryptoki')
-rw-r--r-- | pkgs/tools/security/opencryptoki/default.nix | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/pkgs/tools/security/opencryptoki/default.nix b/pkgs/tools/security/opencryptoki/default.nix index 9ea9c2f4892be..f2929f3e22b42 100644 --- a/pkgs/tools/security/opencryptoki/default.nix +++ b/pkgs/tools/security/opencryptoki/default.nix @@ -1,38 +1,41 @@ -{ stdenv, fetchurl, openssl, trousers, automake, autoconf, libtool, bison, flex }: +{ stdenv, fetchFromGitHub, openssl, trousers, autoreconfHook, libtool, bison, flex }: stdenv.mkDerivation rec { - version = "3.2"; name = "opencryptoki-${version}"; + version = "3.8.1"; - src = fetchurl { - url = "mirror://sourceforge/opencryptoki/opencryptoki/v${version}/opencryptoki-v${version}.tgz"; - sha256 = "06r6zp299vxdspl6k65myzgjv0bihg7kc500v7s4jd3mcrkngd6h"; + src = fetchFromGitHub { + owner = "opencryptoki"; + repo = "opencryptoki"; + rev = "v${version}"; + sha256 = "1m618pjfzw18irmh6i4pfq1gvcxgyfh9ikjn33nrdj55v2l27g31"; }; - buildInputs = [ automake autoconf libtool openssl trousers bison flex ]; + nativeBuildInputs = [ autoreconfHook libtool bison flex ]; + buildInputs = [ openssl trousers ]; - preConfigure = '' - substituteInPlace configure.in --replace "chown" "true" - substituteInPlace configure.in --replace "chgrp" "true" - sh bootstrap.sh --prefix=$out + postPatch = '' + substituteInPlace configure.ac \ + --replace "usermod" "true" \ + --replace "groupadd" "true" \ + --replace "chmod" "true" \ + --replace "chgrp" "true" + substituteInPlace usr/lib/Makefile.am --replace "DESTDIR" "out" ''; - configureFlags = [ "--disable-ccatok" "--disable-icatok" ]; + configureFlags = [ + "--prefix=$(out)" + "--disable-ccatok" + "--disable-icatok" + ]; - makeFlags = "DESTDIR=$(out)"; - - # work around the build script of opencryptoki - postInstall = '' - cp -r $out/$out/* $out - rm -r $out/nix - ''; + enableParallelBuilding = true; meta = with stdenv.lib; { description = "PKCS#11 implementation for Linux"; - homepage = http://opencryptoki.sourceforge.net/; + homepage = https://github.com/opencryptoki/opencryptoki; license = licenses.cpl10; maintainers = [ maintainers.tstrobel ]; platforms = platforms.unix; }; } - |