depot/third_party/nixpkgs/pkgs/development/tools/misc/astyle/default.nix
Default email 14910f5943 Project import generated by Copybara.
GitOrigin-RevId: 5aaed40d22f0d9376330b6fa413223435ad6fee5
2022-01-13 15:06:32 -05:00

26 lines
675 B
Nix

{ stdenv, lib, fetchurl, cmake }:
stdenv.mkDerivation rec {
pname = "astyle";
version = "3.1";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}_${version}_linux.tar.gz";
sha256 = "1ms54wcs7hg1bsywqwf2lhdfizgbk7qxc9ghasxk8i99jvwlrk6b";
};
# lots of hardcoded references to /usr
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace ' /usr/' " $out/"
'';
nativeBuildInputs = [ cmake ];
meta = with lib; {
description = "Source code indenter, formatter, and beautifier for C, C++, C# and Java";
homepage = "http://astyle.sourceforge.net/";
license = licenses.lgpl3;
platforms = platforms.unix;
};
}