nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchFromGitHub, fetchurl, hexio, python, which, asn2quickder, bash }:
2
3stdenv.mkDerivation rec {
4 pname = "quickder";
5 name = "${pname}-${version}";
6 version = "1.0-RC2";
7
8 src = fetchFromGitHub {
9 sha256 = "1nzk8x6qzpvli8bf74dc2qya63nlppqjrnkaxvjxr2dbqb8qcrqd";
10 rev = "version-${version}";
11 owner = "vanrein";
12 repo = "quick-der";
13 };
14
15 buildInputs = [ which asn2quickder bash ];
16
17 patchPhase = ''
18 substituteInPlace Makefile \
19 --replace 'lib tool test rfc' 'lib test rfc'
20 substituteInPlace ./rfc/Makefile \
21 --replace 'ASN2QUICKDER_CMD = ' 'ASN2QUICKDER_CMD = ${asn2quickder}/bin/asn2quickder #'
22 '';
23
24 installFlags = "ASN2QUICKDER_DIR=${asn2quickder}/bin ASN2QUICKDER_CMD=${asn2quickder}/bin/asn2quickder";
25 installPhase = ''
26 mkdir -p $out/lib $out/man
27 make DESTDIR=$out PREFIX=/ all
28 make DESTDIR=$out PREFIX=/ install
29 '';
30
31 meta = with stdenv.lib; {
32 description = "Quick (and Easy) DER, a Library for parsing ASN.1";
33 homepage = https://github.com/vanrein/quick-der;
34 license = licenses.bsd2;
35 platforms = platforms.linux;
36 maintainers = with maintainers; [ leenaars ];
37 };
38}