2021-01-23 04:26:19 -08:00
|
|
|
{ lib, stdenv, fetchurl, flex, bison }:
|
2010-07-28 04:55:54 -07:00
|
|
|
|
2019-01-02 07:26:06 -08:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "cproto";
|
2021-01-19 01:36:21 -08:00
|
|
|
version = "4.7r";
|
2008-04-27 11:20:57 -07:00
|
|
|
|
2010-07-28 04:55:54 -07:00
|
|
|
src = fetchurl {
|
2019-01-02 07:26:06 -08:00
|
|
|
urls = [
|
|
|
|
"mirror://debian/pool/main/c/cproto/cproto_${version}.orig.tar.gz"
|
|
|
|
# No version listings and apparently no versioned tarball over http(s).
|
|
|
|
"ftp://ftp.invisible-island.net/cproto/cproto-${version}.tgz"
|
|
|
|
];
|
2021-01-19 01:36:21 -08:00
|
|
|
sha256 = "sha256-bgRg2yVZXHobUz8AUaV4ZKBkp2KjP+2oXbDXmPTUX8U=";
|
2008-04-27 11:20:57 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
# patch made by Joe Khoobyar copied from gentoo bugs
|
2020-08-05 02:53:41 -07:00
|
|
|
patches = [ ./cproto.patch ];
|
2008-04-27 11:20:57 -07:00
|
|
|
|
2019-01-02 07:26:06 -08:00
|
|
|
nativeBuildInputs = [ flex bison ];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
[ "$("$out/bin/cproto" -V 2>&1)" = '${version}' ]
|
|
|
|
'';
|
|
|
|
|
2021-01-23 04:26:19 -08:00
|
|
|
meta = with lib; {
|
2010-07-28 04:55:54 -07:00
|
|
|
description = "Tool to generate C function prototypes from C source code";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://invisible-island.net/cproto/";
|
2019-01-02 07:26:06 -08:00
|
|
|
license = licenses.publicDomain;
|
2020-07-20 16:43:19 -07:00
|
|
|
platforms = platforms.all;
|
2008-04-27 11:20:57 -07:00
|
|
|
};
|
|
|
|
}
|