Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 34 lines 1.1 kB view raw
1{ lib, stdenv, fetchurl, texinfo, buildPackages, pkgsStatic }: 2 3stdenv.mkDerivation rec { 4 pname = "indent"; 5 version = "2.2.12"; 6 7 src = fetchurl { 8 url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz"; 9 sha256 = "12xvcd16cwilzglv9h7sgh4h1qqjd1h8s48ji2dla58m4706hzg7"; 10 }; 11 12 patches = [ ./darwin.patch ]; 13 makeFlags = [ "AR=${stdenv.cc.targetPrefix}ar" ]; 14 15 strictDeps = true; 16 nativeBuildInputs = [ texinfo ]; 17 pkgsBuildBuild = [ buildPackages.stdenv.cc ]; # needed when cross-compiling 18 19 env.NIX_CFLAGS_COMPILE = toString ( 20 lib.optional stdenv.cc.isClang "-Wno-implicit-function-declaration" 21 ++ lib.optional (stdenv.cc.isClang && lib.versionAtLeast (lib.getVersion stdenv.cc) "13") "-Wno-unused-but-set-variable" 22 ); 23 24 hardeningDisable = [ "format" ]; 25 26 passthru.tests.static = pkgsStatic.indent; 27 meta = { 28 homepage = "https://www.gnu.org/software/indent/"; 29 description = "A source code reformatter"; 30 license = lib.licenses.gpl3Plus; 31 maintainers = [ lib.maintainers.mmahut ]; 32 platforms = lib.platforms.unix; 33 }; 34}