From 3622038d20bb88f9a77ffe371721a9f77627e8af Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Mon, 25 Jan 2016 12:13:10 +0300 Subject: [PATCH] easyrsa2: init at 2.2.0 --- pkgs/tools/networking/easyrsa/2.x.nix | 46 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 48 insertions(+) create mode 100644 pkgs/tools/networking/easyrsa/2.x.nix diff --git a/pkgs/tools/networking/easyrsa/2.x.nix b/pkgs/tools/networking/easyrsa/2.x.nix new file mode 100644 index 000000000000..e49c32aac704 --- /dev/null +++ b/pkgs/tools/networking/easyrsa/2.x.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchurl, autoconf, automake111x, makeWrapper +, gnugrep, openssl}: + +stdenv.mkDerivation rec { + name = "easyrsa-2.2.0"; + + src = fetchurl { + url = "https://github.com/OpenVPN/easy-rsa/archive/v2.2.0.tar.gz"; + sha256 = "1xq4by5frb6ikn53ss3y8v7ss639dccxfq8jfrbk07ynkmk668qk"; + }; + + # Copy missing files and autoreconf + preConfigure = '' + cp ${automake111x}/share/automake/install-sh . + cp ${automake111x}/share/automake/missing . + + autoreconf + ''; + + preBuild = '' + mkdir -p $out/share/easy-rsa + ''; + + nativeBuildInputs = [ autoconf makeWrapper automake111x ]; + buildInputs = [ gnugrep openssl]; + + # Make sane defaults and patch default config vars + postInstall = '' + cp $out/share/easy-rsa/openssl-1.0.0.cnf $out/share/easy-rsa/openssl.cnf + for prog in $(find "$out/share/easy-rsa" -executable -type f); do + makeWrapper "$prog" "$out/bin/$(basename $prog)" \ + --set EASY_RSA "$out/share/easy-rsa" \ + --set OPENSSL "${openssl}/bin/openssl" \ + --set GREP "${gnugrep}/bin/grep" + done + sed -i "/EASY_RSA=\|OPENSSL=\|GREP=/d" $out/share/easy-rsa/vars + ''; + + meta = with stdenv.lib; { + description = "Simple shell based CA utility"; + homepage = http://openvpn.net/; + license = licenses.gpl2; + maintainers = [ maintainers.offline ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1b35d454d231..905b4c18e8a4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1386,6 +1386,8 @@ let easyrsa = callPackage ../tools/networking/easyrsa { }; + easyrsa2 = callPackage ../tools/networking/easyrsa/2.x.nix { }; + ebook_tools = callPackage ../tools/text/ebook-tools { }; ecryptfs = callPackage ../tools/security/ecryptfs { };