10 stdenv.mkDerivation rec {
15 url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
16 hash = "sha256-HpS2T08GRh+QOdCUrv6dSyjGbTSRayekVgVefWLXNwI=";
19 nativeBuildInputs = [ cmake ];
21 # upstream repo includes a build/ directory
22 cmakeBuildDir = "_build";
24 cmakeFlags = lib.optional asLibrary [
25 "-DBUILD_SHARED_LIBS=ON"
28 postInstall = lib.optionalString asLibrary ''
29 install -Dm444 ../src/astyle.h $out/include/astyle.h
32 nativeInstallCheckInputs = [ versionCheckHook ];
33 versionCheckProgramArg = "--version";
34 doInstallCheck = !asLibrary;
37 description = "Source code indenter, formatter, and beautifier for C, C++, C# and Java";
38 mainProgram = "astyle";
39 homepage = "https://astyle.sourceforge.net/";
40 license = licenses.lgpl3;
41 maintainers = with maintainers; [ carlossless ];
42 platforms = platforms.unix;