2021-12-06 16:07:01 +00:00
|
|
|
{ lib, stdenv, fetchurl, texinfo, buildPackages, pkgsStatic }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "indent";
|
|
|
|
version = "2.2.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-21 07:28:18 +00:00
|
|
|
url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "12xvcd16cwilzglv9h7sgh4h1qqjd1h8s48ji2dla58m4706hzg7";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./darwin.patch ];
|
2021-12-06 16:07:01 +00:00
|
|
|
makeFlags = [ "AR=${stdenv.cc.targetPrefix}ar" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [ texinfo ];
|
|
|
|
pkgsBuildBuild = [ buildPackages.stdenv.cc ]; # needed when cross-compiling
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
|
2020-04-24 23:36:52 +00:00
|
|
|
"-Wno-implicit-function-declaration";
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
passthru.tests.static = pkgsStatic.indent;
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
homepage = "https://www.gnu.org/software/indent/";
|
|
|
|
description = "A source code reformatter";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
|
|
|
maintainers = [ lib.maintainers.mmahut ];
|
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|