Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, perl, libtool, pkg-config, gettext, mandoc, ed }: 2 3stdenv.mkDerivation rec { 4 pname = "bsdbuild"; 5 version = "3.1"; 6 7 src = fetchurl { 8 url = "http://stable.hypertriton.com/bsdbuild/${pname}-${version}.tar.gz"; 9 sha256 = "1zrdjh7a6z4khhfw9zrp490afq306cpl5v8wqz2z55ys7k1n5ifl"; 10 }; 11 12 buildInputs = [ perl mandoc ed ]; 13 nativeBuildInputs = [ pkg-config libtool gettext ]; 14 15 prePatch = '' 16 #ignore unfamiliar flags 17 substituteInPlace configure \ 18 --replace '--sbindir=*' '--sbindir=* | --includedir=* | --oldincludedir=*' 19 #same for packages using bsdbuild 20 substituteInPlace mkconfigure.pl \ 21 --replace '--sbindir=*' '--sbindir=* | --includedir=* | --oldincludedir=*' 22 #insert header for missing NULL macro 23 for f in db4.pm sdl_ttf.pm mysql.pm uim.pm strlcpy.pm getpwuid.pm \ 24 getaddrinfo.pm strtoll.pm free_null.pm getpwnam_r.pm \ 25 gettimeofday.pm gethostbyname.pm xinerama.pm strsep.pm \ 26 fontconfig.pm gettext.pm pthreads.pm strlcat.pm kqueue.pm wgl.pm \ 27 alsa.pm crypt.pm cracklib.pm freesg-rg.pm edacious.pm mmap.pm \ 28 agar.pm x11.pm x11.pm execvp.pm agar-core.pm dyld.pm getopt.pm \ 29 strtold.pm sdl_image.pm shl_load.pm glx.pm percgi.pm timerfd.pm \ 30 glob.pm dlopen.pm freesg.pm csidl.pm perl.pm select.pm \ 31 portaudio.pm etubestore.pm; 32 do 33ed -s -v BSDBuild/$f << EOF 34/#include 35i 36#include <stddef.h> 37. 38w 39EOF 40 done 41 ''; 42 43 configureFlags = [ 44 "--with-libtool=${libtool}/bin/libtool" 45 "--enable-nls=yes" 46 "--with-gettext=${gettext}" 47 "--with-manpages=yes" 48 ]; 49 50 meta = { 51 homepage = "http://bsdbuild.hypertriton.com"; 52 description = "Cross-platform build system"; 53 54 longDescription = '' 55 BSDBuild is a cross-platform build system. Derived from the 56 traditional 4.4BSD make libraries, BSDBuild allows BSD-style 57 Makefiles (without BSD make extensions), and works natively 58 under most operating systems and make flavors. Since BSDBuild 59 is implemented as a library (as opposed to a macro package), 60 Makefiles are edited directly, as opposed to being compiled 61 (however, if the build directory is separate from the source 62 directory, BSDBuild will produce the required Makefiles in place). 63 ''; 64 65 license = lib.licenses.bsd3; 66 platforms = lib.platforms.linux; 67 }; 68}