1{ lib, stdenv, fetchurl, autoconf }:
2
3stdenv.mkDerivation rec {
4 pname = "tradcpp";
5 version = "0.5.2";
6
7 src = fetchurl {
8 url = "https://ftp.netbsd.org/pub/NetBSD/misc/dholland/${pname}-${version}.tar.gz";
9 sha256 = "1h2bwxwc13rz3g2236l89hm47f72hn3m4h7wjir3j532kq0m68bc";
10 };
11
12 strictDeps = true;
13 # tradcpp only comes with BSD-make Makefile; the patch adds configure support
14 nativeBuildInputs = [ autoconf ];
15 preConfigure = "autoconf";
16 patches = [
17 ./tradcpp-configure.patch
18 ./aarch64.patch
19 ];
20
21 meta = with lib; {
22 description = "A traditional (K&R-style) C macro preprocessor";
23 mainProgram = "tradcpp";
24 platforms = platforms.all;
25 license = licenses.bsd2;
26 };
27
28}