2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, fetchurl, flex, bison }:
|
2010-07-28 12:55:54 +01:00
|
|
|
|
2019-01-02 15:26:06 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "cproto";
|
2021-01-19 09:36:21 +00:00
|
|
|
version = "4.7r";
|
2008-04-27 19:20:57 +01:00
|
|
|
|
2010-07-28 12:55:54 +01:00
|
|
|
src = fetchurl {
|
2019-01-02 15:26:06 +00: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 09:36:21 +00:00
|
|
|
sha256 = "sha256-bgRg2yVZXHobUz8AUaV4ZKBkp2KjP+2oXbDXmPTUX8U=";
|
2008-04-27 19:20:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# patch made by Joe Khoobyar copied from gentoo bugs
|
2020-08-05 10:53:41 +01:00
|
|
|
patches = [ ./cproto.patch ];
|
2008-04-27 19:20:57 +01:00
|
|
|
|
2019-01-02 15:26:06 +00:00
|
|
|
nativeBuildInputs = [ flex bison ];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
[ "$("$out/bin/cproto" -V 2>&1)" = '${version}' ]
|
|
|
|
'';
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2010-07-28 12:55:54 +01:00
|
|
|
description = "Tool to generate C function prototypes from C source code";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://invisible-island.net/cproto/";
|
2019-01-02 15:26:06 +00:00
|
|
|
license = licenses.publicDomain;
|
2020-07-21 00:43:19 +01:00
|
|
|
platforms = platforms.all;
|
2008-04-27 19:20:57 +01:00
|
|
|
};
|
|
|
|
}
|