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