Merge pull request #144957 from KAction/static/indent

indent: fix static build
This commit is contained in:
Ryan Burns 2021-11-07 12:08:14 -08:00 committed by GitHub
commit aa1277c258
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, texinfo }:
{ lib, stdenv, fetchurl, texinfo, buildPackages, pkgsStatic }:
stdenv.mkDerivation rec {
pname = "indent";
@ -10,14 +10,18 @@ stdenv.mkDerivation rec {
};
patches = [ ./darwin.patch ];
makeFlags = [ "AR=${stdenv.cc.targetPrefix}ar" ];
buildInputs = [ texinfo ];
strictDeps = true;
nativeBuildInputs = [ texinfo ];
pkgsBuildBuild = [ buildPackages.stdenv.cc ]; # needed when cross-compiling
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
"-Wno-implicit-function-declaration";
hardeningDisable = [ "format" ];
passthru.tests.static = pkgsStatic.indent;
meta = {
homepage = "https://www.gnu.org/software/indent/";
description = "A source code reformatter";