Files
nixpkgs/pkgs/by-name/as/astyle/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

45 lines
1.0 KiB
Nix

{
stdenv,
lib,
fetchurl,
cmake,
versionCheckHook,
asLibrary ? false,
}:
stdenv.mkDerivation rec {
pname = "astyle";
version = "3.6.12";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
hash = "sha256-Gd6wahq25QELlsKBuuNQVg2XicvIluMD82EBeYMv0r4=";
};
nativeBuildInputs = [ cmake ];
# upstream repo includes a build/ directory
cmakeBuildDir = "_build";
cmakeFlags = lib.optional asLibrary [
"-DBUILD_SHARED_LIBS=ON"
];
postInstall = lib.optionalString asLibrary ''
install -Dm444 ../src/astyle.h $out/include/astyle.h
'';
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
doInstallCheck = !asLibrary;
meta = with lib; {
description = "Source code indenter, formatter, and beautifier for C, C++, C# and Java";
mainProgram = "astyle";
homepage = "https://astyle.sourceforge.net/";
license = licenses.lgpl3;
maintainers = with maintainers; [ carlossless ];
platforms = platforms.unix;
};
}