nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 57 lines 2.2 kB view raw
1{ lib, stdenv, fetchurl }: 2 3# Note: this package is used for bootstrapping fetchurl, and thus 4# cannot use fetchpatch! All mutable patches (generated by GitHub or 5# cgit) that are needed here should be included directly in Nixpkgs as 6# files. 7 8stdenv.mkDerivation rec { 9 pname = "gnum4"; 10 version = "1.4.19"; 11 12 src = fetchurl { 13 url = "mirror://gnu/m4/m4-${version}.tar.bz2"; 14 sha256 = "sha256-swapHA/ZO8QoDPwumMt6s5gf91oYe+oyk4EfRSyJqMg="; 15 }; 16 17 # https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/m4/m4-1.4.19-r1.ebuild 18 patches = lib.optional stdenv.hostPlatform.isLoongArch64 ./loong-fix-build.patch; 19 postPatch = if stdenv.hostPlatform.isLoongArch64 then '' 20 touch ./aclocal.m4 ./lib/config.hin ./configure ./doc/stamp-vti || die 21 find . -name Makefile.in -exec touch {} + || die 22 '' else null; 23 24 strictDeps = true; 25 enableParallelBuilding = true; 26 27 doCheck = false; 28 29 configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ] 30 ++ lib.optional stdenv.hostPlatform.isMinGW "CFLAGS=-fno-stack-protector"; 31 32 meta = { 33 description = "GNU M4, a macro processor"; 34 longDescription = '' 35 GNU M4 is an implementation of the traditional Unix macro 36 processor. It is mostly SVR4 compatible although it has some 37 extensions (for example, handling more than 9 positional 38 parameters to macros). GNU M4 also has built-in functions for 39 including files, running shell commands, doing arithmetic, etc. 40 41 GNU M4 is a macro processor in the sense that it copies its 42 input to the output expanding macros as it goes. Macros are 43 either builtin or user-defined and can take any number of 44 arguments. Besides just doing macro expansion, m4 has builtin 45 functions for including named files, running UNIX commands, 46 doing integer arithmetic, manipulating text in various ways, 47 recursion etc... m4 can be used either as a front-end to a 48 compiler or as a macro processor in its own right. 49 ''; 50 homepage = "https://www.gnu.org/software/m4/"; 51 52 license = lib.licenses.gpl3Plus; 53 mainProgram = "m4"; 54 platforms = lib.platforms.unix ++ lib.platforms.windows; 55 }; 56 57}