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";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "4.7w";
|
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"
|
|
|
|
];
|
2024-09-19 14:19:46 +00:00
|
|
|
sha256 = "sha256-ix1GjM2aKFnzmcdf773KDf3KTcMYkf7bxArFwybSe20=";
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "cproto";
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|