summary refs log tree commit diff
path: root/pkgs/applications/misc/roxterm
diff options
context:
space:
mode:
author(cdep)illabout <cdep.illabout@gmail.com>2014-09-19 17:08:37 +0200
committer(cdep)illabout <cdep.illabout@gmail.com>2014-09-19 17:28:24 +0200
commite52caabe63a6c610a8ec3cf23020a623585c722d (patch)
treef4ced50a84dda83fb4f392094f5639897dc8ce13 /pkgs/applications/misc/roxterm
parent62e4bf2716e3f927ca24232b82a28e4a68495c51 (diff)
downloadnixpkgs-e52caabe63a6c610a8ec3cf23020a623585c722d.tar
nixpkgs-e52caabe63a6c610a8ec3cf23020a623585c722d.tar.gz
nixpkgs-e52caabe63a6c610a8ec3cf23020a623585c722d.tar.bz2
nixpkgs-e52caabe63a6c610a8ec3cf23020a623585c722d.tar.lz
nixpkgs-e52caabe63a6c610a8ec3cf23020a623585c722d.tar.xz
nixpkgs-e52caabe63a6c610a8ec3cf23020a623585c722d.tar.zst
nixpkgs-e52caabe63a6c610a8ec3cf23020a623585c722d.zip
Took out builder script for default builder.
Removed the builder script in order to use the default builder based on
comments from a code review.
Diffstat (limited to 'pkgs/applications/misc/roxterm')
-rw-r--r--pkgs/applications/misc/roxterm/builder.sh23
-rw-r--r--pkgs/applications/misc/roxterm/default.nix51
2 files changed, 34 insertions, 40 deletions
diff --git a/pkgs/applications/misc/roxterm/builder.sh b/pkgs/applications/misc/roxterm/builder.sh
deleted file mode 100644
index d752ba69f52..00000000000
--- a/pkgs/applications/misc/roxterm/builder.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-
-# Fix up python path so the lockfile library is on it.
-# TODO: This probably shouldn't hardcode python2.7.
-for path in $pythonPath; do
-	echo $path
-	PYTHONPATH="${PYTHONPATH}${path}/lib/python2.7/site-packages:"
-done
-export PYTHONPATH
-
-# Fix up the LD_LIBRARY_PATH so that expat is on it
-export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ldLibraryPath"
-
-source $stdenv/setup
-
-unpackPhase
-cd "$name"
-
-python mscript.py configure --prefix="$out"
-python mscript.py build
-python mscript.py install
-
-wrapProgram "$out/bin/roxterm" \
-	--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
diff --git a/pkgs/applications/misc/roxterm/default.nix b/pkgs/applications/misc/roxterm/default.nix
index 51ce333fc24..723739eede8 100644
--- a/pkgs/applications/misc/roxterm/default.nix
+++ b/pkgs/applications/misc/roxterm/default.nix
@@ -1,42 +1,59 @@
-{ stdenv, fetchurl, docbook_xsl, dbus_libs, dbus_glib, expat, gettext, gsettings_desktop_schemas, gdk_pixbuf, gtk2, gtk3, hicolor_icon_theme, imagemagick, itstool, librsvg, libtool, libxslt, lockfile, makeWrapper, pkgconfig, pythonFull, pythonPackages, vte }:
+{ stdenv, fetchurl, docbook_xsl, dbus_libs, dbus_glib, expat, gettext
+, gsettings_desktop_schemas, gdk_pixbuf, gtk2, gtk3, hicolor_icon_theme
+, imagemagick, itstool, librsvg, libtool, libxslt, lockfile, makeWrapper
+, pkgconfig, pythonFull, pythonPackages, vte }:
 
 # TODO: Still getting following warning:
 # Gtk-WARNING **: Error loading icon from file '/nix/store/36haql12nc3c91jqf0w8nz29zrwxd2gl-roxterm-2.9.4/share/icons/hicolor/scalable/apps/roxterm.svg':
 # Couldn't recognize the image file format for file '/nix/store/36haql12nc3c91jqf0w8nz29zrwxd2gl-roxterm-2.9.4/share/icons/hicolor/scalable/apps/roxterm.svg'
 
-stdenv.mkDerivation rec {
-
-  versionMajor = "2.9";
-  versionMinor = "4";
-
-  name = "roxterm-${versionMajor}.${versionMinor}";
+let version = "2.9.4";
+in stdenv.mkDerivation rec {
+  name = "roxterm-${version}";
 
   src = fetchurl {
     url = "http://downloads.sourceforge.net/roxterm/${name}.tar.bz2";
     sha256 = "0djfiwfmnqqp6930kswzr2rss0mh40vglcdybwpxrijcw4n8j21x";
   };
 
-  buildInputs = [ docbook_xsl expat imagemagick itstool librsvg libtool libxslt makeWrapper pkgconfig pythonFull pythonPackages.lockfile ];
+  buildInputs =
+    [ docbook_xsl expat imagemagick itstool librsvg libtool libxslt
+      makeWrapper pkgconfig pythonFull pythonPackages.lockfile ];
 
-  propagatedBuildInputs = [ dbus_libs dbus_glib gdk_pixbuf gettext gsettings_desktop_schemas gtk2 gtk3 hicolor_icon_theme vte ];
+  propagatedBuildInputs =
+    [ dbus_libs dbus_glib gdk_pixbuf gettext gsettings_desktop_schemas gtk2 gtk3 hicolor_icon_theme vte ];
 
   NIX_CFLAGS_COMPILE = [ "-I${dbus_glib}/include/dbus-1.0"
                          "-I${dbus_libs}/include/dbus-1.0"
                          "-I${dbus_libs}/lib/dbus-1.0/include" ];
 
-  ldLibraryPath = "${expat}/lib"; # ugly hack for xgettext to work during build
+  # Fix up python path so the lockfile library is on it.
+  PYTHONPATH = stdenv.lib.makeSearchPath "lib/${pythonFull.python.libPrefix}/site-packages" [
+    pythonPackages.curses pythonPackages.lockfile
+  ];
+
+  buildPhase = ''
+    # Fix up the LD_LIBRARY_PATH so that expat is on it
+    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${expat}/lib"
+
+    python mscript.py configure --prefix="$out"
+    python mscript.py build
+  '';
 
-  pythonPath = [ pythonPackages.curses pythonPackages.lockfile ];
+  installPhase = ''
+    python mscript.py install
 
-  builder = ./builder.sh;
+    wrapProgram "$out/bin/roxterm" \
+        --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
+  '';
 
   meta = with stdenv.lib; {
     homepage = http://roxterm.sourceforge.net/;
-	license = licenses.gpl3;
-	description = "Tabbed, VTE-based terminal emulator";
-	longDescription = ''
-	  Tabbed, VTE-based terminal emulator.  Similar to gnome-terminal without the dependencies on Gnome.
-	'';
+    license = licenses.gpl3;
+    description = "Tabbed, VTE-based terminal emulator";
+    longDescription = ''
+      Tabbed, VTE-based terminal emulator.  Similar to gnome-terminal without the dependencies on Gnome.
+    '';
     platforms = platforms.linux;
   };
 }