about summary refs log tree commit diff
path: root/pkgs/applications/misc
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/misc')
-rw-r--r--pkgs/applications/misc/googleearth/default.nix96
-rw-r--r--pkgs/applications/misc/keepassx/community.nix4
-rw-r--r--pkgs/applications/misc/krename/kde4.nix (renamed from pkgs/applications/misc/krename/default.nix)0
-rw-r--r--pkgs/applications/misc/krename/kde5.nix35
-rw-r--r--pkgs/applications/misc/llpp/default.nix19
-rw-r--r--pkgs/applications/misc/redshift-plasma-applet/default.nix40
-rw-r--r--pkgs/applications/misc/taskwarrior/0001-bash-completion-quote-pattern-argument-to-grep.patch28
-rw-r--r--pkgs/applications/misc/taskwarrior/default.nix4
8 files changed, 168 insertions, 58 deletions
diff --git a/pkgs/applications/misc/googleearth/default.nix b/pkgs/applications/misc/googleearth/default.nix
index 1e6caa93b2d3..df8cb71d6f9e 100644
--- a/pkgs/applications/misc/googleearth/default.nix
+++ b/pkgs/applications/misc/googleearth/default.nix
@@ -1,77 +1,79 @@
 { stdenv, fetchurl, glibc, mesa, freetype, glib, libSM, libICE, libXi, libXv
 , libXrender, libXrandr, libXfixes, libXcursor, libXinerama, libXext, libX11, qt4
-, zlib, fontconfig }:
+, zlib, fontconfig, dpkg }:
 
-/* I haven't found any x86_64 package from them */
-assert stdenv.system == "i686-linux";
-
-stdenv.mkDerivation {
-  name = "googleearth-6.0.3.2197";
-
-  src = fetchurl {
-    url = http://dl.google.com/earth/client/current/GoogleEarthLinux.bin;
-    sha256 = "0bcpmnlk03382x577qbnbw3i6y08hr3qmg85pqj35scnl6van74c";
-  };
-
-  nativeBuildInputs = [
+let
+  arch =
+    if stdenv.system == "x86_64-linux" then "amd64"
+    else if stdenv.system == "i686-linux" then "i386"
+    else abort "Unsupported architecture";
+  sha256 =
+    if arch == "amd64"
+    then "0dwnppn5snl5bwkdrgj4cyylnhngi0g66fn2k41j3dvis83x24k6"
+    else "0gndbxrj3kgc2dhjqwjifr3cl85hgpm695z0wi01wvwzhrjqs0l2";
+  fullPath = stdenv.lib.makeLibraryPath [
     glibc
     glib
     stdenv.cc.cc
-    libSM 
-    libICE 
-    libXi 
+    libSM
+    libICE
+    libXi
     libXv
     mesa
-    libXrender 
-    libXrandr 
-    libXfixes 
-    libXcursor 
-    libXinerama 
-    freetype 
-    libXext 
-    libX11 
+    libXrender
+    libXrandr
+    libXfixes
+    libXcursor
+    libXinerama
+    freetype
+    libXext
+    libX11
     qt4
     zlib
     fontconfig
   ];
+in
+stdenv.mkDerivation rec {
+  version = "7.1.4.1529";
+  name = "googleearth-${version}";
+
+  src = fetchurl {
+    url = "https://dl.google.com/earth/client/current/google-earth-stable_current_${arch}.deb";
+    inherit sha256;
+  };
 
   phases = "unpackPhase installPhase";
-  
+
+  buildInputs = [ dpkg ];
+
   unpackPhase = ''
-    bash $src --noexec --target unpacked
-    cd unpacked
+    dpkg-deb -x ${src} ./
   '';
-  
+
   installPhase =''
-    mkdir -p $out/{opt/googleearth/,bin};
-    tar xf googleearth-data.tar -C $out/opt/googleearth
-    tar xf googleearth-linux-x86.tar -C $out/opt/googleearth
-    cp bin/googleearth $out/opt/googleearth
-    cat > $out/bin/googleearth << EOF
-    #!/bin/sh
-    export GOOGLEEARTH_DATA_PATH=$out/opt/googleearth
-    exec $out/opt/googleearth/googleearth
-    EOF
-    chmod +x $out/bin/googleearth
+    mkdir $out
+    mv usr/* $out/
+    rmdir usr
+    mv * $out/
+    rm $out/bin/google-earth $out/opt/google/earth/free/google-earth
+    ln -s $out/opt/google/earth/free/googleearth $out/bin/google-earth
 
-    fullPath=
-    for i in $nativeBuildInputs; do
-      fullPath=$fullPath:$i/lib
-    done
-          
     patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
-      --set-rpath $fullPath \
-      $out/opt/googleearth/googleearth-bin
+      --set-rpath "${fullPath}:\$ORIGIN" \
+      $out/opt/google/earth/free/googleearth-bin
 
-    for a in $out/opt/googleearth/*.so* ; do
-      patchelf --set-rpath $fullPath $a
+    for a in $out/opt/google/earth/free/*.so* ; do
+      patchelf --set-rpath "${fullPath}:\$ORIGIN" $a
     done
   '';
 
+  dontPatchELF = true;
+
   meta = {
     description = "A world sphere viewer";
     homepage = http://earth.google.com;
     license = stdenv.lib.licenses.unfree;
     maintainers = [ stdenv.lib.maintainers.viric ];
+    platforms = stdenv.lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/misc/keepassx/community.nix b/pkgs/applications/misc/keepassx/community.nix
index 075de4dcb652..58b45786c40e 100644
--- a/pkgs/applications/misc/keepassx/community.nix
+++ b/pkgs/applications/misc/keepassx/community.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, cmake, libgcrypt, qt5, zlib, libmicrohttpd, libXtst }:
+{ stdenv, fetchFromGitHub, cmake, libgcrypt, zlib, libmicrohttpd, libXtst, qtbase, qttools }:
 
 stdenv.mkDerivation rec {
   name = "keepassx-community-${version}";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     sha256 = "0qwmi9f8ik3vkwl1kx7g3079h5ia4wl87y42nr5dal3ic1jc941p";
   };
 
-  buildInputs = [ cmake libgcrypt zlib qt5.full libXtst libmicrohttpd ];
+  buildInputs = [ cmake libgcrypt zlib qtbase qttools libXtst libmicrohttpd ];
 
   meta = {
     description = "Fork of the keepassX password-manager with additional http-interface to allow browser-integration an use with plugins such as PasslFox (https://github.com/pfn/passifox). See also keepassX2.";
diff --git a/pkgs/applications/misc/krename/default.nix b/pkgs/applications/misc/krename/kde4.nix
index 1e4da7fa11f7..1e4da7fa11f7 100644
--- a/pkgs/applications/misc/krename/default.nix
+++ b/pkgs/applications/misc/krename/kde4.nix
diff --git a/pkgs/applications/misc/krename/kde5.nix b/pkgs/applications/misc/krename/kde5.nix
new file mode 100644
index 000000000000..a2137060ef64
--- /dev/null
+++ b/pkgs/applications/misc/krename/kde5.nix
@@ -0,0 +1,35 @@
+{
+  kdeDerivation, kdeWrapper, fetchFromGitHub, lib,
+  ecm, kdoctools, kconfig, kinit, kjsembed,
+  taglib, exiv2, podofo
+}:
+
+let
+  pname = "krename";
+  version = "20161228";
+  unwrapped = kdeDerivation rec {
+    name = "${pname}-${version}";
+
+    src = fetchFromGitHub {
+      owner  = "KDE";
+      repo   = "krename";
+      rev    = "4e55c2bef50898eb4a6485ce068379b166121895";
+      sha256 = "09yz3sxy2l6radfybkj2f7224ggf315vnvyksk0aq8f03gan6cbp";
+    };
+
+    meta = with lib; {
+      homepage = http://www.krename.net;
+      description = "A powerful batch renamer for KDE";
+      inherit (kconfig.meta) platforms;
+      maintainers = with maintainers; [ urkud peterhoeg ];
+    };
+
+    buildInputs = [ taglib exiv2 podofo ];
+    nativeBuildInputs = [ ecm kdoctools ];
+    propagatedBuildInputs = [ kconfig kinit kjsembed ];
+  };
+
+in kdeWrapper {
+  inherit unwrapped;
+  targets = [ "bin/krename" ];
+}
diff --git a/pkgs/applications/misc/llpp/default.nix b/pkgs/applications/misc/llpp/default.nix
index e350a9a95301..ee06ea1ad6cf 100644
--- a/pkgs/applications/misc/llpp/default.nix
+++ b/pkgs/applications/misc/llpp/default.nix
@@ -1,26 +1,29 @@
-{ stdenv, lib, makeWrapper, fetchgit, pkgconfig, ninja, ocaml, findlib, mupdf, lablgl
-, gtk3, openjpeg, jbig2dec, mujs, xsel, openssl, freetype, ncurses }:
+{ stdenv, lib, makeWrapper, fetchgit, pkgconfig, ninja, ocaml, findlib, mupdf
+, lablgl, gtk3, openjpeg, jbig2dec, mujs, xsel, openssl, freetype, ncurses }:
 
 assert lib.versionAtLeast (lib.getVersion ocaml) "4.02";
 
 let ocamlVersion = (builtins.parseDrvName (ocaml.name)).version;
 in stdenv.mkDerivation rec {
   name = "llpp-${version}";
-  version = "21-git-2016-05-07";
+  version = "25-git-2017-01-18";
 
   src = fetchgit {
     url = "git://repo.or.cz/llpp.git";
-    rev = "1beb003ca0f4ed90fda2823cb07c2eb674fc3ca4";
-    sha256 = "1r59yfm81zmiij401d3wc3zb1zc873ss02gkplbwi4lad2l0chba";
+    rev = "22740b9bca1c60ef18cf90538994ce4981539901";
+    sha256 = "0yg8z2zwhg2f5il2i1clx3b7hl088ncpk686rfxlvwyjg3qs3mv4";
     fetchSubmodules = false;
   };
 
-  buildInputs = [ pkgconfig ninja makeWrapper ocaml findlib mupdf lablgl
-                  gtk3 jbig2dec openjpeg mujs openssl freetype ncurses ];
+  nativeBuildInputs = [ pkgconfig makeWrapper ninja ];
+  buildInputs = [ ocaml findlib mupdf gtk3 jbig2dec # lablgl
+    openjpeg mujs openssl freetype ncurses ];
 
   dontStrip = true;
 
   configurePhase = ''
+    sed -i -e 's+fz_set_use_document_css (state.ctx, usedoccss);+/* fz_set_use_document_css (state.ctx, usedoccss); */+' link.c
+    sed -i -e 's+ocamlc --version+ocamlc -version+' build.sh
     sed -i -e 's+-I \$srcdir/mupdf/include -I \$srcdir/mupdf/thirdparty/freetype/include+-I ${freetype.dev}/include+' build.sh
     sed -i -e 's+-lmupdf +-lfreetype -lz -lharfbuzz -ljbig2dec -lopenjp2 -ljpeg -lmupdf +' build.sh
     sed -i -e 's+-L\$srcdir/mupdf/build/native ++' build.sh
@@ -29,12 +32,12 @@ in stdenv.mkDerivation rec {
   buildPhase = ''
     sh ./build.sh build
   '';
+#        --prefix CAML_LD_LIBRARY_PATH ":" "${lablgl}/lib/ocaml/${ocamlVersion}/site-lib/lablgl" \
 
   installPhase = ''
     install -d $out/bin $out/lib
     install build/llpp $out/bin
     wrapProgram $out/bin/llpp \
-        --prefix CAML_LD_LIBRARY_PATH ":" "${lablgl}/lib/ocaml/${ocamlVersion}/site-lib/lablgl" \
         --prefix CAML_LD_LIBRARY_PATH ":" "$out/lib" \
         --prefix PATH ":" "${xsel}/bin"
   '';
diff --git a/pkgs/applications/misc/redshift-plasma-applet/default.nix b/pkgs/applications/misc/redshift-plasma-applet/default.nix
new file mode 100644
index 000000000000..3cf6f7d754be
--- /dev/null
+++ b/pkgs/applications/misc/redshift-plasma-applet/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, cmake, kde5, redshift, fetchFromGitHub, ... }:
+
+let version = "1.0.17"; in
+
+stdenv.mkDerivation {
+  name = "redshift-plasma-applet-${version}";
+
+  src = fetchFromGitHub {
+    owner = "kotelnik";
+    repo = "plasma-applet-redshift-control";
+    rev = "v${version}";
+    sha256 = "1lp1rb7i6c18lrgqxsglbvyvzh71qbm591abrbhw675ii0ca9hgj";
+  };
+
+  patchPhase = ''
+    substituteInPlace package/contents/ui/main.qml \
+      --replace "redshiftCommand: 'redshift'" \
+                "redshiftCommand: '${redshift}/bin/redshift'" \
+      --replace "redshiftOneTimeCommand: 'redshift -O " \
+                "redshiftOneTimeCommand: '${redshift}/bin/redshift -O "
+
+    substituteInPlace package/contents/ui/config/ConfigAdvanced.qml \
+      --replace "'redshift -V'" \
+                "'${redshift}/bin/redshift -V'"
+  '';
+
+  buildInputs = [
+    cmake
+    kde5.plasma-framework
+  ];
+
+
+  meta = with stdenv.lib; {
+    description = "KDE Plasma 5 widget for controlling Redshift";
+    homepage = https://github.com/kotelnik/plasma-applet-redshift-control;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ benley ];
+  };
+}
diff --git a/pkgs/applications/misc/taskwarrior/0001-bash-completion-quote-pattern-argument-to-grep.patch b/pkgs/applications/misc/taskwarrior/0001-bash-completion-quote-pattern-argument-to-grep.patch
new file mode 100644
index 000000000000..8e5c0139e555
--- /dev/null
+++ b/pkgs/applications/misc/taskwarrior/0001-bash-completion-quote-pattern-argument-to-grep.patch
@@ -0,0 +1,28 @@
+From 0d677475b710b9bb61d4b3ac5435c36b47d3a155 Mon Sep 17 00:00:00 2001
+From: Peter Simons <simons@cryp.to>
+Date: Wed, 8 Feb 2017 11:28:42 +0100
+Subject: [PATCH] bash-completion: quote pattern argument to grep
+
+Without the quotes, bash might expand that pattern based on the contents of the
+current working directory or -- if nullglob is set -- the argument disappears
+outright if no directory entry matches.
+---
+ scripts/bash/task.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/bash/task.sh b/scripts/bash/task.sh
+index e0c7fb03..d15ed3eb 100644
+--- a/scripts/bash/task.sh
++++ b/scripts/bash/task.sh
+@@ -72,7 +72,7 @@ _task_offer_contexts() {
+     COMPREPLY=( $(compgen -W "$($taskcommand _context) define delete list none show" -- $cur) )
+ }
+ 
+-_task_context_alias=$($taskcommand show | grep alias.*context | cut -d' ' -f1 | cut -d. -f2)
++_task_context_alias=$($taskcommand show | grep "alias.*context" | cut -d' ' -f1 | cut -d. -f2)
+ 
+ _task()
+ {
+-- 
+2.11.1
+
diff --git a/pkgs/applications/misc/taskwarrior/default.nix b/pkgs/applications/misc/taskwarrior/default.nix
index eea7ffdcaf23..e4938b928dab 100644
--- a/pkgs/applications/misc/taskwarrior/default.nix
+++ b/pkgs/applications/misc/taskwarrior/default.nix
@@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
     sha256 = "059a9yc58wcicc6xxsjh1ph7k2yrag0spsahp1wqmsq6h7jwwyyq";
   };
 
+  patches = [ ./0001-bash-completion-quote-pattern-argument-to-grep.patch ];
+
   nativeBuildInputs = [ cmake libuuid gnutls ];
 
   postInstall = ''
@@ -19,7 +21,7 @@ stdenv.mkDerivation rec {
   '';
 
   meta = with stdenv.lib; {
-    description = "GTD (getting things done) implementation";
+    description = "Highly flexible command-line tool to manage TODO lists";
     homepage = http://taskwarrior.org;
     license = licenses.mit;
     maintainers = with maintainers; [ marcweber jgeerds ];