2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, flex, bison }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cproto";
|
2021-03-19 17:17:44 +00:00
|
|
|
version = "4.7r";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
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-03-19 17:17:44 +00:00
|
|
|
sha256 = "sha256-bgRg2yVZXHobUz8AUaV4ZKBkp2KjP+2oXbDXmPTUX8U=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# patch made by Joe Khoobyar copied from gentoo bugs
|
2020-08-20 17:08:02 +00:00
|
|
|
patches = [ ./cproto.patch ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ flex bison ];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
[ "$("$out/bin/cproto" -V 2>&1)" = '${version}' ]
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Tool to generate C function prototypes from C source code";
|
|
|
|
homepage = "https://invisible-island.net/cproto/";
|
|
|
|
license = licenses.publicDomain;
|
2020-08-20 17:08:02 +00:00
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|