git.iko.soy/typeable/nixpkgs
on master help sign in
astyle: fix on Darwin
commit162f870e6faf2f71ef4bc43540588310f198e11a authorSpencer Whitt <sw@swhitt.me> dateSat 4 Apr 2015, 00:53 (12 years ago) parentd5225d5
1 file changed+10−4
pkgs/development/tools/misc/astyle/default.nix+10−4
pkgs/development/tools/misc/astyle/default.nix+10−4
@@ -12,16 +12,22 @@ stdenv.mkDerivation {
1212 sha256 = "1b0f4wm1qmgcswmixv9mwbp86hbdqxk754hml8cjv5vajvqwdpzv";
1313 };
1414
15− sourceRoot = "astyle/build/gcc";
15+ sourceRoot = if (stdenv.cc.cc.isClang or false)
16+ then "astyle/build/clang"
17+ else "astyle/build/gcc";
18+
19+ # -s option is obsolete on Darwin and breaks build
20+ postPatch = if stdenv.isDarwin then ''
21+ substituteInPlace Makefile --replace "LDFLAGSr = -s" "LDFLAGSr ="
22+ '' else null;
1623
1724 installFlags = "INSTALL=install prefix=$$out";
1825
1926 meta = {
2027 homepage = "http://astyle.sourceforge.net/";
2128 description = "Source code indenter, formatter, and beautifier for C, C++, C# and Java";
22− license = "LGPL";
23−
24− platforms = stdenv.lib.platforms.linux;
29+ license = stdenv.lib.licenses.lgpl3;
30+ platforms = stdenv.lib.platforms.unix;
2531 maintainers = [ stdenv.lib.maintainers.simons ];
2632 };
2733}