Merge pull request #34161 from leenaars/asn2quickder

pythonPackages update: asn1ate and asn2quickder
This commit is contained in:
Jörg Thalheim 2018-02-20 12:27:10 +00:00 committed by GitHub
commit 825ff649b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 78 additions and 41 deletions

View file

@ -1,32 +1,53 @@
{ stdenv, fetchFromGitHub, fetchurl, hexio, python, which, asn2quickder, bash }:
{ stdenv, fetchFromGitHub, fetchurl, python2Packages, hexio
, which, cmake, bash, arpa2cm, git, asn2quickder, pkgconfig }:
stdenv.mkDerivation rec {
pname = "quickder";
name = "${pname}-${version}";
version = "1.0-RC2";
version = "1.2-6";
src = fetchFromGitHub {
sha256 = "1nzk8x6qzpvli8bf74dc2qya63nlppqjrnkaxvjxr2dbqb8qcrqd";
sha256 = "00wifjydgmqw2i5vmr049visc3shjqccgzqynkmmhkjhs86ghzr6";
rev = "version-${version}";
owner = "vanrein";
repo = "quick-der";
};
buildInputs = [ which asn2quickder bash ];
buildInputs = with python2Packages; [
arpa2cm
asn1ate
bash
cmake
git
hexio
pyparsing
python
six
which
asn1ate
asn2quickder
pkgconfig
];
patchPhase = ''
substituteInPlace Makefile \
--replace 'lib tool test rfc' 'lib test rfc'
substituteInPlace ./rfc/Makefile \
--replace 'ASN2QUICKDER_CMD = ' 'ASN2QUICKDER_CMD = ${asn2quickder}/bin/asn2quickder #'
'';
postPatch = ''
substituteInPlace ./CMakeLists.txt \
--replace "get_version_from_git" "set (Quick-DER_VERSION 1.2) #"
substituteInPlace ./CMakeLists.txt \
--replace \$\{ARPA2CM_TOOLCHAIN_DIR} "$out/share/ARPA2CM/toolchain/"
patchShebangs python/scripts/
'';
installFlags = "ASN2QUICKDER_DIR=${asn2quickder}/bin ASN2QUICKDER_CMD=${asn2quickder}/bin/asn2quickder";
installPhase = ''
mkdir -p $out/lib $out/man
make DESTDIR=$out PREFIX=/ all
make DESTDIR=$out PREFIX=/ install
'';
cmakeFlags = [
"-DNO_TESTING=ON"
"-DARPA2CM_TOOLCHAIN_DIR=$out/share/ARPA2CM/toolchain/"
"-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON"
"-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON"
"-DPACKAGE_NO_PACKAGE_REGISTRY=ON"
];
preConfigure = ''
export PREFIX=$out
'';
meta = with stdenv.lib; {
description = "Quick (and Easy) DER, a Library for parsing ASN.1";

View file

@ -1,15 +1,12 @@
{ stdenv, buildPythonPackage, fetchFromGitHub
, pyparsing }:
{ stdenv, buildPythonPackage, fetchFromGitHub, pyparsing }:
buildPythonPackage rec {
pname = "asn1ate";
date = "20160810";
version = "unstable-${date}";
name = "${pname}-${version}";
version= "0.6";
src = fetchFromGitHub {
sha256 = "04pddr1mh2v9qq8fg60czwvjny5qwh4nyxszr3qc4bipiiv2xk9w";
rev = "c56104e8912400135509b584d84423ee05a5af6b";
sha256 = "1p8hv4gsyqsdr0gafcq497n52pybiqmc22di8ai4nsj60fv0km45";
rev = "v${version}";
owner = "kimgr";
repo = pname;
};

View file

@ -1,30 +1,25 @@
{ stdenv, fetchFromGitHub, python2Packages, makeWrapper }:
{ stdenv, buildPythonApplication, fetchFromGitHub, makeWrapper, cmake
, pytestrunner, pytest, six, pyparsing, asn1ate }:
stdenv.mkDerivation rec {
buildPythonApplication rec {
pname = "asn2quickder";
name = "${pname}-${version}";
version = "0.7-RC1";
version = "1.2-6";
src = fetchFromGitHub {
sha256 = "0ynajhbml28m4ipbj5mscjcv6g1a7frvxfimxh813rhgl0w3sgq8";
sha256 = "00wifjydgmqw2i5vmr049visc3shjqccgzqynkmmhkjhs86ghzr6";
rev = "version-${version}";
owner = "vanrein";
repo = "${pname}";
repo = "quick-der";
};
propagatedBuildInputs = with python2Packages; [ pyparsing makeWrapper ];
patchPhase = ''
patchShebangs ./python/scripts/*
'';
patchPhase = with python2Packages; ''
substituteInPlace Makefile \
--replace '..' '..:$(DESTDIR)/${python.sitePackages}:${python2Packages.pyparsing}/${python.sitePackages}' \
'';
buildInputs = [ makeWrapper cmake ];
checkInputs = [ pytestrunner pytest ];
installPhase = ''
mkdir -p $out/${python2Packages.python.sitePackages}/
mkdir -p $out/bin $out/lib $out/sbin $out/man
make DESTDIR=$out PREFIX=/ all
make DESTDIR=$out PREFIX=/ install
'';
propagatedBuildInputs = [ pyparsing asn1ate six ];
meta = with stdenv.lib; {
description = "An ASN.1 compiler with a backend for Quick DER";

View file

@ -0,0 +1,22 @@
{ stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "arpa2cm";
version = "0.5";
name = "${pname}-${version}";
src = fetchFromGitHub {
sha256 = "093h7njj8d8iiwnw5byfxkkzlbny60fwv1w57j8f1lsd4yn6rih4";
rev = "version-${version}";
repo = "${pname}";
owner = "arpa2";
};
buildInputs = [ cmake ];
meta = with stdenv.lib; {
description = "CMake Module library for the ARPA2 project";
license = licenses.bsd2;
maintainers = with maintainers; [ leenaars ];
};
}

View file

@ -7278,7 +7278,9 @@ with pkgs;
kt = callPackage ../tools/misc/kt {};
asn2quickder = callPackage ../development/tools/asn2quickder {};
arpa2cm = callPackage ../development/tools/build-managers/arpa2cm { };
asn2quickder = python2Packages.callPackage ../development/tools/asn2quickder {};
astyle = callPackage ../development/tools/misc/astyle { };