summary refs log tree commit diff
path: root/pkgs/development/tools/misc
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/misc')
-rw-r--r--pkgs/development/tools/misc/astyle/default.nix34
-rw-r--r--pkgs/development/tools/misc/texi2html/default.nix25
2 files changed, 30 insertions, 29 deletions
diff --git a/pkgs/development/tools/misc/astyle/default.nix b/pkgs/development/tools/misc/astyle/default.nix
index e66d92e34d6..66e972826cb 100644
--- a/pkgs/development/tools/misc/astyle/default.nix
+++ b/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;
   };
 }
diff --git a/pkgs/development/tools/misc/texi2html/default.nix b/pkgs/development/tools/misc/texi2html/default.nix
index b094f05e951..247733b81ba 100644
--- a/pkgs/development/tools/misc/texi2html/default.nix
+++ b/pkgs/development/tools/misc/texi2html/default.nix
@@ -1,20 +1,27 @@
-{ stdenv, fetchurl, perl }:
+{ stdenv, fetchurl, perl, gettext }:
 
 stdenv.mkDerivation rec {
-  name = "texi2html-1.82";
+  pname = "texi2html";
+  version = "5.0";
 
   src = fetchurl {
-    url = "mirror://savannah/texi2html/${name}.tar.bz2";
-    sha256 = "1wdli2szkgm3l0vx8rf6lylw0b0m47dlz9iy004n928nqkzix76n";
+    url = "mirror://savannah/texi2html/${pname}-${version}.tar.bz2";
+    sha256 = "1yprv64vrlcbksqv25asplnjg07mbq38lfclp1m5lj8cw878pag8";
   };
 
-  buildInputs = [perl];
+  nativeBuildInputs = [ gettext ];
+  buildInputs = [ perl ];
 
-  meta = { 
+  preBuild = ''
+    substituteInPlace separated_to_hash.pl \
+      --replace "/usr/bin/perl" "${perl}/bin/perl"
+  '';
+
+  meta = with stdenv.lib; {
     description = "Perl script which converts Texinfo source files to HTML output";
     homepage = https://www.nongnu.org/texi2html/;
-    license = stdenv.lib.licenses.gpl2;
-    maintainers = [stdenv.lib.maintainers.marcweber];
-    platforms = stdenv.lib.platforms.unix;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.marcweber ];
+    platforms = platforms.unix;
   };
 }