depot/third_party/nixpkgs/pkgs/development/tools/misc/cproto/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

35 lines
955 B
Nix

{ lib, stdenv, fetchurl, flex, bison }:
stdenv.mkDerivation rec {
pname = "cproto";
version = "4.7w";
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"
];
sha256 = "sha256-ix1GjM2aKFnzmcdf773KDf3KTcMYkf7bxArFwybSe20=";
};
# patch made by Joe Khoobyar copied from gentoo bugs
patches = [ ./cproto.patch ];
nativeBuildInputs = [ flex bison ];
doCheck = true;
doInstallCheck = true;
installCheckPhase = ''
[ "$("$out/bin/cproto" -V 2>&1)" = '${version}' ]
'';
meta = with lib; {
description = "Tool to generate C function prototypes from C source code";
mainProgram = "cproto";
homepage = "https://invisible-island.net/cproto/";
license = licenses.publicDomain;
platforms = platforms.all;
};
}