summary refs log tree commit diff
path: root/pkgs/tools/X11
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2016-03-15 01:44:24 +0000
committerRobin Gloster <mail@glob.in>2016-03-15 01:44:24 +0000
commit3f45f0948d6fe158bed063adb66850ded0ba4861 (patch)
treeac717689d391d3f5333132fc34e4b2aed829414c /pkgs/tools/X11
parenta9b942c0617b1cd5f0732d05eadad0114a178f37 (diff)
parentd227d9a70e41d65e4e6f4ac75a9d243c5a19fa85 (diff)
downloadnixlib-3f45f0948d6fe158bed063adb66850ded0ba4861.tar
nixlib-3f45f0948d6fe158bed063adb66850ded0ba4861.tar.gz
nixlib-3f45f0948d6fe158bed063adb66850ded0ba4861.tar.bz2
nixlib-3f45f0948d6fe158bed063adb66850ded0ba4861.tar.lz
nixlib-3f45f0948d6fe158bed063adb66850ded0ba4861.tar.xz
nixlib-3f45f0948d6fe158bed063adb66850ded0ba4861.tar.zst
nixlib-3f45f0948d6fe158bed063adb66850ded0ba4861.zip
Merge remote-tracking branch 'upstream/master' into hardened-stdenv
Diffstat (limited to 'pkgs/tools/X11')
-rw-r--r--pkgs/tools/X11/xdg-utils/default.nix21
-rw-r--r--pkgs/tools/X11/xpra/default.nix11
-rw-r--r--pkgs/tools/X11/xpra/gtk3.nix17
3 files changed, 28 insertions, 21 deletions
diff --git a/pkgs/tools/X11/xdg-utils/default.nix b/pkgs/tools/X11/xdg-utils/default.nix
index 23b406c2d43f..6f1335593621 100644
--- a/pkgs/tools/X11/xdg-utils/default.nix
+++ b/pkgs/tools/X11/xdg-utils/default.nix
@@ -28,18 +28,17 @@ stdenv.mkDerivation rec {
 
   postInstall = stdenv.lib.optionalString mimiSupport ''
     cp ${mimisrc}/xdg-open $out/bin/xdg-open
-    substituteInPlace $out/bin/xdg-open --replace "awk " "${gawk}/bin/awk "
-    substituteInPlace $out/bin/xdg-open --replace "sort " "${coreutils}/bin/sort "
-    substituteInPlace $out/bin/xdg-open --replace "(file " "(${file}/bin/file "
-  '' + ''
-    for item in $out/bin/*; do
-      substituteInPlace $item --replace "cut " "${coreutils}/bin/cut "
-      substituteInPlace $item --replace "sed " "${gnused}/bin/sed "
-      substituteInPlace $item --replace "egrep " "${gnugrep}/bin/egrep "
-      sed -i $item -re "s#([^e])grep #\1${gnugrep}/bin/grep #g" # Don't replace 'egrep'
-      substituteInPlace $item --replace "which " "type -P "
-      substituteInPlace $item --replace "/usr/bin/file" "${file}/bin/file"
+  ''
+  + ''
+    for tool in "${coreutils}/bin/cut" "${gnused}/bin/sed" \
+      "${gnugrep}"/bin/{e,}grep "${file}/bin/file" \
+      ${stdenv.lib.optionalString mimiSupport
+        '' "${gawk}/bin/awk" "${coreutils}/bin/sort" ''} ;
+    do
+      sed "s# $(basename "$tool") # $tool #g" -i "$out"/bin/*
     done
+
+    sed 's# which # type -P #g' -i "$out"/bin/*
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix
index e0e12051bffd..b0c79342d42a 100644
--- a/pkgs/tools/X11/xpra/default.nix
+++ b/pkgs/tools/X11/xpra/default.nix
@@ -6,12 +6,11 @@
 , libfakeXinerama }:
 
 buildPythonApplication rec {
-  name = "xpra-0.15.3";
+  name = "xpra-0.16.2";
   namePrefix = "";
-
   src = fetchurl {
-    url = "https://www.xpra.org/src/${name}.tar.xz";
-    sha256 = "1671r4ah2h0i3qbp27csck506n5y1zr9fv0869cv09knspa358i4";
+    url = "http://xpra.org/src/${name}.tar.xz";
+    sha256 = "0h55rv46byzv2g8g77bm0a0py8jpz3gbr5fhr5jy9sisyr0vk6ff";
   };
 
   buildInputs = [
@@ -36,7 +35,7 @@ buildPythonApplication rec {
   preBuild = ''
     export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags gtk+-2.0) $(pkg-config --cflags pygtk-2.0) $(pkg-config --cflags xtst)"
   '';
-  setupPyBuildFlags = ["--with-Xdummy"];
+  setupPyBuildFlags = ["--with-Xdummy" "--without-strict"];
 
   preInstall = ''
     # see https://bitbucket.org/pypa/setuptools/issue/130/install_data-doesnt-respect-prefix
@@ -52,6 +51,8 @@ buildPythonApplication rec {
       --prefix PATH : ${getopt}/bin:${xorgserver}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin
   '';
 
+  preCheck = "exit 0";
+
   #TODO: replace postInstall with postFixup to avoid double wrapping of xpra; needs more work though
   #postFixup = ''
   #  sed -i '2iexport XKB_BINDIR="${xkbcomp}/bin"' $out/bin/xpra
diff --git a/pkgs/tools/X11/xpra/gtk3.nix b/pkgs/tools/X11/xpra/gtk3.nix
index 5b81ec0a7edc..7fd24a510d5d 100644
--- a/pkgs/tools/X11/xpra/gtk3.nix
+++ b/pkgs/tools/X11/xpra/gtk3.nix
@@ -6,14 +6,19 @@
 , libfakeXinerama }:
 
 buildPythonApplication rec {
-  name = "xpra-0.14.19";
+  name = "xpra-0.16.2";
   namePrefix = "";
 
   src = fetchurl {
-    url = "https://www.xpra.org/src/${name}.tar.xz";
-    sha256 = "0jifaysz4br1v0zibnzgd0k02rgybbsysvwrgbar1452sjb3db5m";
+    url = "http://xpra.org/src/${name}.tar.xz";
+    sha256 = "0h55rv46byzv2g8g77bm0a0py8jpz3gbr5fhr5jy9sisyr0vk6ff";
   };
 
+  patchPhase = ''
+    substituteInPlace setup.py --replace 'pycairo' 'py3cairo'
+    substituteInPlace xpra/client/gtk3/cairo_workaround.pyx --replace 'pycairo/pycairo.h' 'py3cairo.h'
+  '';
+
   buildInputs = [
     pkgconfig
 
@@ -36,8 +41,7 @@ buildPythonApplication rec {
   preBuild = ''
     export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags gtk+-3.0) $(pkg-config --cflags xtst)"
   '';
-  setupPyBuildFlags = [ "--with-gtk3" "--without-gtk2" "--with-Xdummy" ];
-
+  setupPyBuildFlags = [ "--without-strict" "--with-gtk3" "--without-gtk2" "--with-Xdummy" ];
 
   preInstall = ''
     # see https://bitbucket.org/pypa/setuptools/issue/130/install_data-doesnt-respect-prefix
@@ -53,6 +57,9 @@ buildPythonApplication rec {
       --prefix PATH : ${getopt}/bin:${xorgserver}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin
   '';
 
+  preCheck = "exit 0";
+  doInstallCheck = false;
+
   #TODO: replace postInstall with postFixup to avoid double wrapping of xpra; needs more work though
   #postFixup = ''
   #  sed -i '2iexport XKB_BINDIR="${xkbcomp}/bin"' $out/bin/xpra