1{ lib
2, buildPythonApplication
3, fetchFromGitLab
4, makeWrapper
5, cmake
6, six
7, pyparsing
8, asn1ate
9, colored
10}:
11
12buildPythonApplication rec {
13 pname = "asn2quickder";
14 version = "1.7.1";
15
16 src = fetchFromGitLab {
17 owner = "arpa2";
18 repo = "quick-der";
19 rev = "v${version}";
20 sha256 = "sha256-f+ph5PL+uWRkswpOLDwZFWjh938wxoJ6xocJZ2WZLEk=";
21 };
22
23 postPatch = ''
24 patchShebangs ./python/scripts/*
25
26 # Unpin pyparsing 3.0.0. Issue resolved in latest version.
27 substituteInPlace setup.py --replace 'pyparsing==3.0.0' 'pyparsing'
28 '';
29
30 dontUseCmakeConfigure = true;
31
32 nativeBuildInputs = [ makeWrapper cmake ];
33
34 propagatedBuildInputs = [ pyparsing asn1ate six colored ];
35
36 doCheck = false; # Flaky tests
37
38 meta = with lib; {
39 description = "An ASN.1 compiler with a backend for Quick DER";
40 homepage = "https://gitlab.com/arpa2/quick-der";
41 license = licenses.bsd3;
42 platforms = platforms.linux;
43 maintainers = with maintainers; [ leenaars ];
44 };
45}