@@ -0,0 +1,36 @@
1+{ stdenv, fetchFromGitHub, pythonPackages, makeWrapper }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "asn2quickder";
5+ name = "${pname}-${version}";
6+ version = "0.7-RC1";
7+
8+ src = fetchFromGitHub {
9+ sha256 = "0ynajhbml28m4ipbj5mscjcv6g1a7frvxfimxh813rhgl0w3sgq8";
10+ rev = "version-${version}";
11+ owner = "vanrein";
12+ repo = "${pname}";
13+ };
14+
15+ propagatedBuildInputs = with pythonPackages; [ pyparsing makeWrapper ];
16+
17+ patchPhase = with pythonPackages; ''
18+ substituteInPlace Makefile \
19+ --replace '..' '..:$(DESTDIR)/${python.sitePackages}:${pythonPackages.pyparsing}/${python.sitePackages}' \
20+ '';
21+
22+ installPhase = ''
23+ mkdir -p $out/${pythonPackages.python.sitePackages}/
24+ mkdir -p $out/bin $out/lib $out/sbin $out/man
25+ make DESTDIR=$out PREFIX=/ all
26+ make DESTDIR=$out PREFIX=/ install
27+ '';
28+
29+ meta = with stdenv.lib; {
30+ description = "An ASN.1 compiler with a backend for Quick DER";
31+ homepage = https://github.com/vanrein/asn2quickder;
32+ license = licenses.bsd3;
33+ platforms = platforms.linux;
34+ maintainers = with maintainers; [ leenaars ];
35+ };
36+}