From 05da3db77fe2b7c1300d6a047070a6a4dd6ad7eb Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Thu, 12 Aug 2010 10:39:29 +0000 Subject: [PATCH] Copy qca from kde-4.5 to make qca2_ossl build svn path=/nixpkgs/trunk/; revision=23137 --- pkgs/desktops/kde-4.4/default.nix | 4 ++-- .../desktops/kde-4.4/support/qca2/default.nix | 13 ++++++++++--- pkgs/desktops/kde-4.4/support/qca2/ossl.nix | 19 ++++++++++++++----- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/pkgs/desktops/kde-4.4/default.nix b/pkgs/desktops/kde-4.4/default.nix index fbdd9a5240e9..24db09632e1e 100644 --- a/pkgs/desktops/kde-4.4/default.nix +++ b/pkgs/desktops/kde-4.4/default.nix @@ -32,11 +32,11 @@ pkgs.recurseIntoAttrs (rec { }; qca2 = import ./support/qca2 { - inherit (pkgs) stdenv fetchurl lib which qt4; + inherit (pkgs) stdenv fetchurl which qt4; }; qca2_ossl = import ./support/qca2/ossl.nix { - inherit (pkgs) stdenv fetchurl lib qt4 openssl; + inherit (pkgs) stdenv fetchurl fetchsvn qt4 openssl; inherit qca2; }; diff --git a/pkgs/desktops/kde-4.4/support/qca2/default.nix b/pkgs/desktops/kde-4.4/support/qca2/default.nix index ceff834e95b9..a55f7c8cb431 100644 --- a/pkgs/desktops/kde-4.4/support/qca2/default.nix +++ b/pkgs/desktops/kde-4.4/support/qca2/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, lib, which, qt4}: +{stdenv, fetchurl, which, qt4}: stdenv.mkDerivation { name = "qca-2.0.2"; @@ -7,10 +7,17 @@ stdenv.mkDerivation { sha256 = "49b5474450104a2298747c243de1451ab7a6aeed4bf7df43ffa4b7128a2837b8"; }; buildInputs = [ which qt4 ]; - meta = { + preBuild = '' + sed -i include/QtCrypto/qca_publickey.h -e '/EMSA3_Raw/a,\ + EMSA3_SHA224, ///< SHA224, with EMSA3 (ie PKCS#1 Version 1.5) encoding\ + EMSA3_SHA256, ///< SHA256, with EMSA3 (ie PKCS#1 Version 1.5) encoding\ + EMSA3_SHA384, ///< SHA384, with EMSA3 (ie PKCS#1 Version 1.5) encoding\ + EMSA3_SHA512 ///< SHA512, with EMSA3 (ie PKCS#1 Version 1.5) encoding' + ''; + meta = with stdenv.lib; { description = "Qt Cryptographic Architecture"; license = "LGPL"; homepage = http://delta.affinix.com/qca; - maintainers = [ lib.maintainers.sander ]; + maintainers = [ maintainers.sander maintainers.urkud ]; }; } diff --git a/pkgs/desktops/kde-4.4/support/qca2/ossl.nix b/pkgs/desktops/kde-4.4/support/qca2/ossl.nix index be992eb42ea3..bfaa320618c7 100644 --- a/pkgs/desktops/kde-4.4/support/qca2/ossl.nix +++ b/pkgs/desktops/kde-4.4/support/qca2/ossl.nix @@ -1,23 +1,32 @@ -{stdenv, fetchurl, lib, qt4, qca2, openssl}: +{stdenv, fetchurl, fetchsvn, qt4, qca2, openssl}: stdenv.mkDerivation rec { - name = "qca-ossl-2.0.0-beta3"; + version = "2.0.0-beta3"; + name = "qca-ossl-${version}"; src = fetchurl { url = "http://delta.affinix.com/download/qca/2.0/plugins/${name}.tar.bz2"; sha256 = "0yy68racvx3clybry2i1bw5bz9yhxr40p3xqagxxb15ihvsrzq08"; }; + # SVN version has stabilized and has a lot of fixes for fresh OpenSSL + # Take the main source from there + svn_src = fetchsvn { + url = svn://anonsvn.kde.org/home/kde/trunk/kdesupport/qca/plugins/qca-ossl ; + rev = 1115936; + sha256 = "ef2c0307e8834e1e7cb23b6fea1cc22486328a37186301a6c11161b1c93d834b"; + }; buildInputs = [ qt4 qca2 openssl ]; dontAddPrefix = true; configureFlags="--no-separate-debug-info --with-qca=${qca2} --with-openssl-inc=${openssl}/include --with-openssl-lib=${openssl}/lib"; preConfigure='' + cp ${svn_src}/qca-ossl.cpp . + configureFlags="$configureFlags --plugins-path=$out/lib/qt4/plugins" ''; - patches = [ ./ossl-remove-whirlpool.patch ]; - meta = { + meta = with stdenv.lib; { description = "Qt Cryptographic Architecture OpenSSL plugin"; license = "LGPL"; homepage = http://delta.affinix.com/qca; - maintainers = [ lib.maintainers.urkud ]; + maintainers = [ maintainers.urkud ]; }; }