nixpkgs/pkgs/development/tools/misc/astyle/default.nix

27 lines
676 B
Nix
Raw Normal View History

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