nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchFromGitHub, python2Packages, hexio
2, cmake, bash, arpa2cm, git, asn2quickder }:
3
4stdenv.mkDerivation rec {
5 pname = "quickder";
6 version = "1.3.0";
7
8 src = fetchFromGitHub {
9 sha256 = "15lxv8vcjnsjxg7ywcac5p6mj5vf5pxq1219yap653ci4f1liqfr";
10 rev = "version-${version}";
11 owner = "vanrein";
12 repo = "quick-der";
13 };
14
15 nativeBuildInputs = [ cmake ];
16
17 buildInputs = with python2Packages; [
18 arpa2cm
19 asn1ate
20 hexio
21 pyparsing
22 python
23 six
24 asn1ate
25 asn2quickder
26 ];
27
28 postPatch = ''
29 substituteInPlace ./CMakeLists.txt \
30 --replace "get_version_from_git" "set (Quick-DER_VERSION 1.2) #"
31 substituteInPlace ./CMakeLists.txt \
32 --replace \$\{ARPA2CM_TOOLCHAIN_DIR} "$out/share/ARPA2CM/toolchain/"
33 patchShebangs python/scripts/
34 '';
35
36 cmakeFlags = [
37 "-DNO_TESTING=ON"
38 "-DARPA2CM_TOOLCHAIN_DIR=$out/share/ARPA2CM/toolchain/"
39 ];
40
41 preConfigure = ''
42 export PREFIX=$out
43 '';
44
45 meta = with stdenv.lib; {
46 description = "Quick (and Easy) DER, a Library for parsing ASN.1";
47 homepage = "https://github.com/vanrein/quick-der";
48 license = licenses.bsd2;
49 platforms = platforms.linux;
50 maintainers = with maintainers; [ leenaars ];
51 };
52}