aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/tools/misc/astyle/default.nix
blob: 66e972826cb966a67230f651c2fa137d30fdbe90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ 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 = "https://astyle.sourceforge.net/";
    license = licenses.lgpl3;
    platforms = platforms.unix;
  };
}