diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-08-31 11:57:05 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-09-16 22:04:28 +0000 |
commit | a0842e8b20cbe1ed717b72775428d1f8fc047fa4 (patch) | |
tree | b86d0614a477f7e092d626d59b888d085aaca400 /nixpkgs/pkgs/development/tools/misc/astyle/default.nix | |
parent | c36b32d476b520ed0d2a37cd0973f98583d6dc7c (diff) | |
parent | 8d1510abfb592339e13ce8f6db6f29c1f8b72924 (diff) | |
download | nixlib-a0842e8b20cbe1ed717b72775428d1f8fc047fa4.tar nixlib-a0842e8b20cbe1ed717b72775428d1f8fc047fa4.tar.gz nixlib-a0842e8b20cbe1ed717b72775428d1f8fc047fa4.tar.bz2 nixlib-a0842e8b20cbe1ed717b72775428d1f8fc047fa4.tar.lz nixlib-a0842e8b20cbe1ed717b72775428d1f8fc047fa4.tar.xz nixlib-a0842e8b20cbe1ed717b72775428d1f8fc047fa4.tar.zst nixlib-a0842e8b20cbe1ed717b72775428d1f8fc047fa4.zip |
Merge commit '8d1510abfb592339e13ce8f6db6f29c1f8b72924'
Diffstat (limited to 'nixpkgs/pkgs/development/tools/misc/astyle/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/tools/misc/astyle/default.nix | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/nixpkgs/pkgs/development/tools/misc/astyle/default.nix b/nixpkgs/pkgs/development/tools/misc/astyle/default.nix index e66d92e34d65..66e972826cb9 100644 --- a/nixpkgs/pkgs/development/tools/misc/astyle/default.nix +++ b/nixpkgs/pkgs/development/tools/misc/astyle/default.nix @@ -1,32 +1,26 @@ -{ stdenv, fetchurl }: +{ stdenv, lib, fetchurl, cmake }: -let - name = "astyle"; +stdenv.mkDerivation rec { + pname = "astyle"; version = "3.1"; -in -stdenv.mkDerivation { - name = "${name}-${version}"; src = fetchurl { - url = "mirror://sourceforge/${name}/${name}_${version}_linux.tar.gz"; + url = "mirror://sourceforge/${pname}/${pname}_${version}_linux.tar.gz"; sha256 = "1ms54wcs7hg1bsywqwf2lhdfizgbk7qxc9ghasxk8i99jvwlrk6b"; }; - sourceRoot = if stdenv.cc.isClang - then "astyle/build/clang" - else "astyle/build/gcc"; + # lots of hardcoded references to /usr + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace ' /usr/' " $out/" + ''; - # -s option is obsolete on Darwin and breaks build - postPatch = if stdenv.isDarwin then '' - substituteInPlace Makefile --replace "LDFLAGSr = -s" "LDFLAGSr =" - '' else null; + nativeBuildInputs = [ cmake ]; - installFlags = "INSTALL=install prefix=$$out"; - - meta = { - homepage = http://astyle.sourceforge.net/; + meta = with lib; { description = "Source code indenter, formatter, and beautifier for C, C++, C# and Java"; - license = stdenv.lib.licenses.lgpl3; - platforms = stdenv.lib.platforms.unix; + homepage = "https://astyle.sourceforge.net/"; + license = licenses.lgpl3; + platforms = platforms.unix; }; } |