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