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