Merge pull request #17579 from leenaars/arpa2deps

quick-der library, asn2quickder + hexio tools
This commit is contained in:
Jörg Thalheim
2016-10-10 11:55:45 +02:00
committed by GitHub
5 changed files with 138 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
{ stdenv, fetchFromGitHub, fetchurl, hexio, python, which, asn2quickder, bash }:
stdenv.mkDerivation rec {
pname = "quickder";
name = "${pname}-${version}";
version = "1.0-RC1";
src = fetchFromGitHub {
sha256 = "05gw5dqkw3l8kwwm0044zpxhcp7sxicx9wxbfyr49c91403p870w";
rev = "version-${version}";
owner = "vanrein";
repo = "quick-der";
};
buildInputs = [ which asn2quickder bash ];
patchPhase = ''
substituteInPlace Makefile \
--replace 'lib tool test rfc' 'lib test rfc'
substituteInPlace ./rfc/Makefile \
--replace 'ASN2QUICKDER_CMD = ' 'ASN2QUICKDER_CMD = ${asn2quickder}/bin/asn2quickder #'
'';
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
'';
meta = with stdenv.lib; {
description = "Quick (and Easy) DER, a Library for parsing ASN.1";
homepage = https://github.com/vanrein/quick-der;
license = licenses.bsd2;
platforms = platforms.linux;
maintainers = with maintainers; [ leenaars ];
};
}

View File

@@ -0,0 +1,36 @@
{ stdenv, fetchFromGitHub, pythonPackages, makeWrapper }:
stdenv.mkDerivation rec {
pname = "asn2quickder";
name = "${pname}-${version}";
version = "0.7-RC1";
src = fetchFromGitHub {
sha256 = "0ynajhbml28m4ipbj5mscjcv6g1a7frvxfimxh813rhgl0w3sgq8";
rev = "version-${version}";
owner = "vanrein";
repo = "${pname}";
};
propagatedBuildInputs = with pythonPackages; [ pyparsing makeWrapper ];
patchPhase = with pythonPackages; ''
substituteInPlace Makefile \
--replace '..' '..:$(DESTDIR)/${python.sitePackages}:${pythonPackages.pyparsing}/${python.sitePackages}' \
'';
installPhase = ''
mkdir -p $out/${pythonPackages.python.sitePackages}/
mkdir -p $out/bin $out/lib $out/sbin $out/man
make DESTDIR=$out PREFIX=/ all
make DESTDIR=$out PREFIX=/ install
'';
meta = with stdenv.lib; {
description = "An ASN.1 compiler with a backend for Quick DER";
homepage = https://github.com/vanrein/asn2quickder;
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = with maintainers; [ leenaars ];
};
}

View File

@@ -0,0 +1,36 @@
{ stdenv, fetchFromGitHub, fetchurl, python, pcsclite, pth, glibc }:
stdenv.mkDerivation rec {
pname = "hexio";
name = "${pname}-${version}";
version = "201605";
src = fetchFromGitHub {
sha256 = "08jxkdi0gjsi8s793f9kdlad0a58a0xpsaayrsnpn9bpmm5cgihq";
rev = "f6f963bd0fcd2808977e0ad82dcb3100691cdd7c";
owner = "vanrein";
repo = "hexio";
};
buildInputs = [ python pcsclite pth glibc ];
patchPhase = ''
substituteInPlace Makefile \
--replace '-I/usr/local/include/PCSC/' '-I${pcsclite}/include/PCSC/' \
--replace '-L/usr/local/lib/pth' '-I${pth}/lib/'
'';
installPhase = ''
mkdir -p $out/bin $out/lib $out/sbin $out/man
make DESTDIR=$out PREFIX=/ all
make DESTDIR=$out PREFIX=/ install
'';
meta = with stdenv.lib; {
description = "Low-level I/O helpers for hexadecimal, tty/serial devices and so on";
homepage = https://github.com/vanrein/hexio;
license = licenses.bsd2;
platforms = platforms.linux;
maintainers = with maintainers; [ leenaars ];
};
}