nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchurl, flex, bison }:
2
3stdenv.mkDerivation rec {
4 pname = "cproto";
5 version = "4.7v";
6
7 src = fetchurl {
8 urls = [
9 "mirror://debian/pool/main/c/cproto/cproto_${version}.orig.tar.gz"
10 # No version listings and apparently no versioned tarball over http(s).
11 "ftp://ftp.invisible-island.net/cproto/cproto-${version}.tgz"
12 ];
13 sha256 = "sha256-897D9hAncBlpdkWcS0SsJzVfYSDaduUjHsEyPjedFRE=";
14 };
15
16 # patch made by Joe Khoobyar copied from gentoo bugs
17 patches = [ ./cproto.patch ];
18
19 nativeBuildInputs = [ flex bison ];
20
21 doCheck = true;
22
23 doInstallCheck = true;
24 installCheckPhase = ''
25 [ "$("$out/bin/cproto" -V 2>&1)" = '${version}' ]
26 '';
27
28 meta = with lib; {
29 description = "Tool to generate C function prototypes from C source code";
30 homepage = "https://invisible-island.net/cproto/";
31 license = licenses.publicDomain;
32 platforms = platforms.all;
33 };
34}