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/calibre/default.nix91
-rw-r--r--pkgs/applications/misc/cherrytree/default.nix30
-rw-r--r--pkgs/applications/misc/far2l/default.nix2
-rw-r--r--pkgs/applications/misc/subsurface/0001-core-fix-libgit-ifdef-to-handle-libgit2-v1.0-and-onw.patch41
-rw-r--r--pkgs/applications/misc/subsurface/default.nix24
5 files changed, 83 insertions, 105 deletions
diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix
index bc3f846ad6c1..afd602f60884 100644
--- a/pkgs/applications/misc/calibre/default.nix
+++ b/pkgs/applications/misc/calibre/default.nix
@@ -122,7 +122,16 @@ mkDerivation rec {
     export PODOFO_INC_DIR=${podofo.dev}/include/podofo
     export PODOFO_LIB_DIR=${podofo.lib}/lib
     export SIP_BIN=${pypkgs.sip}/bin/sip
-    ${pypkgs.python.interpreter} setup.py install --prefix=$out
+    export XDG_DATA_HOME=$out/share
+    export XDG_UTILS_INSTALL_MODE="user"
+
+    ${pypkgs.python.interpreter} setup.py install --root=$out \
+      --prefix=$out \
+      --libdir=$out/lib \
+      --staging-root=$out \
+      --staging-libdir=$out/lib \
+      --staging-sharedir=$out/share
+
 
     PYFILES="$out/bin/* $out/lib/calibre/calibre/web/feeds/*.py
       $out/lib/calibre/calibre/ebooks/metadata/*.py
@@ -131,13 +140,6 @@ mkDerivation rec {
     sed -i "s/env python[0-9.]*/python/" $PYFILES
     sed -i "2i import sys; sys.argv[0] = 'calibre'" $out/bin/calibre
 
-    # Replace @out@ by the output path.
-    mkdir -p $out/share/applications/
-    cp {$calibreDesktopItem,$ebookEditDesktopItem,$ebookViewerDesktopItem}/share/applications/* $out/share/applications/
-    for entry in $out/share/applications/*.desktop; do
-      substituteAllInPlace $entry
-    done
-
     mkdir -p $out/share
     cp -a man-pages $out/share/man
 
@@ -165,79 +167,6 @@ mkDerivation rec {
 
   disallowedReferences = [ podofo.dev ];
 
-  calibreDesktopItem = makeDesktopItem {
-    fileValidation = false; # fails before substitution
-    name = "calibre-gui";
-    desktopName = "calibre";
-    exec = "@out@/bin/calibre --detach %F";
-    genericName = "E-book library management";
-    icon = "@out@/share/calibre/images/library.png";
-    comment = "Manage, convert, edit, and read e-books";
-    mimeType = lib.concatStringsSep ";" [
-      "application/x-mobipocket-subscription"
-      "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
-      "text/html"
-      "application/x-cbc"
-      "application/ereader"
-      "application/oebps-package+xml"
-      "image/vnd.djvu"
-      "application/x-sony-bbeb"
-      "application/vnd.ms-word.document.macroenabled.12"
-      "text/rtf"
-      "text/x-markdown"
-      "application/pdf"
-      "application/x-cbz"
-      "application/x-mobipocket-ebook"
-      "application/x-cbr"
-      "application/x-mobi8-ebook"
-      "text/fb2+xml"
-      "application/vnd.oasis.opendocument.text"
-      "application/epub+zip"
-      "text/plain"
-      "application/xhtml+xml"
-    ];
-    categories = "Office";
-    extraEntries = ''
-      Actions=Edit;Viewer;
-
-      [Desktop Action Edit]
-      Name=Edit E-book
-      Icon=@out@/share/calibre/images/tweak.png
-      Exec=@out@/bin/ebook-edit --detach %F
-
-      [Desktop Action Viewer]
-      Name=E-book Viewer
-      Icon=@out@/share/calibre/images/viewer.png
-      Exec=@out@/bin/ebook-viewer --detach %F
-    '';
-  };
-
-  ebookEditDesktopItem = makeDesktopItem {
-    fileValidation = false; # fails before substitution
-    name = "calibre-edit-book";
-    desktopName = "Edit E-book";
-    genericName = "E-book Editor";
-    comment = "Edit e-books";
-    icon = "@out@/share/calibre/images/tweak.png";
-    exec = "@out@/bin/ebook-edit --detach %F";
-    categories = "Office;Publishing";
-    mimeType = "application/epub+zip";
-    extraEntries = "NoDisplay=true";
-  };
-
-  ebookViewerDesktopItem = makeDesktopItem {
-    fileValidation = false; # fails before substitution
-    name = "calibre-ebook-viewer";
-    desktopName = "E-book Viewer";
-    genericName = "E-book Viewer";
-    comment = "Read e-books in all the major formats";
-    icon = "@out@/share/calibre/images/viewer.png";
-    exec = "@out@/bin/ebook-viewer --detach %F";
-    categories = "Office;Viewer";
-    mimeType = "application/epub+zip";
-    extraEntries = "NoDisplay=true";
-  };
-
   meta = with lib; {
     description = "Comprehensive e-book software";
     homepage = "https://calibre-ebook.com";
diff --git a/pkgs/applications/misc/cherrytree/default.nix b/pkgs/applications/misc/cherrytree/default.nix
index 72279e84909c..7c00add77971 100644
--- a/pkgs/applications/misc/cherrytree/default.nix
+++ b/pkgs/applications/misc/cherrytree/default.nix
@@ -1,12 +1,15 @@
-{ lib, fetchurl, pythonPackages, gettext }:
+{ lib, fetchFromGitHub, pythonPackages, gettext }:
 
 pythonPackages.buildPythonApplication rec {
   pname = "cherrytree";
-  version = "0.39.1";
+  version = "0.39.2";
+
+  src = fetchFromGitHub {
+    owner = "giuspen";
+    repo = "cherrytree";
+    rev = version;
+    sha256 = "1l6wh24bhp4yhmsfmc0r4n2n10nlilkv4cmv5sfl80i250fiw7xa";
 
-  src = fetchurl {
-    url = "https://www.giuspen.com/software/${pname}-${version}.tar.xz";
-    sha256 = "0qhycblnixvbybzr8psgmgcpfs6jc9m0p2h9lmd5zmiaggqlcsv7";
   };
 
   nativeBuildInputs = [ gettext ];
@@ -20,17 +23,16 @@ pythonPackages.buildPythonApplication rec {
   meta = with lib; {
     description = "An hierarchical note taking application";
     longDescription = ''
-      Cherrytree is an hierarchical note taking application,
-      featuring rich text, syntax highlighting and powerful search
-      capabilities. It organizes all information in units called
-      "nodes", as in a tree, and can be very useful to store any piece
-      of information, from tables and links to pictures and even entire
-      documents. All those little bits of information you have scattered
-      around your hard drive can be conveniently placed into a
-      Cherrytree document where you can easily find it.
+      Cherrytree is an hierarchical note taking application, featuring rich
+      text, syntax highlighting and powerful search capabilities. It organizes
+      all information in units called "nodes", as in a tree, and can be very
+      useful to store any piece of information, from tables and links to
+      pictures and even entire documents. All those little bits of information
+      you have scattered around your hard drive can be conveniently placed into
+      a Cherrytree document where you can easily find it.
     '';
     homepage = "http://www.giuspen.com/cherrytree";
     license = licenses.gpl3;
-    maintainers = with maintainers; [ AndersonTorres ];
+    maintainers = with maintainers; [ ];
   };
 }
diff --git a/pkgs/applications/misc/far2l/default.nix b/pkgs/applications/misc/far2l/default.nix
index 1a79554f0fe3..de2ed0d15964 100644
--- a/pkgs/applications/misc/far2l/default.nix
+++ b/pkgs/applications/misc/far2l/default.nix
@@ -74,7 +74,7 @@ stdenv.mkDerivation rec {
     wrapProgram $out/bin/far2l --argv0 $out/bin/far2l
   '';
 
-  stripDebugList = "bin share";
+  stripDebugList = [ "bin" "share" ];
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/applications/misc/subsurface/0001-core-fix-libgit-ifdef-to-handle-libgit2-v1.0-and-onw.patch b/pkgs/applications/misc/subsurface/0001-core-fix-libgit-ifdef-to-handle-libgit2-v1.0-and-onw.patch
new file mode 100644
index 000000000000..027e3f493e12
--- /dev/null
+++ b/pkgs/applications/misc/subsurface/0001-core-fix-libgit-ifdef-to-handle-libgit2-v1.0-and-onw.patch
@@ -0,0 +1,41 @@
+From dfa4bcafec4425659a409550085417af3c5c787b Mon Sep 17 00:00:00 2001
+From: Florian Klink <flokli@flokli.de>
+Date: Sat, 11 Apr 2020 12:38:38 +0200
+Subject: [PATCH] core: fix libgit ifdef to handle libgit2 v1.0 and onwards
+
+Conditional code for older libgit versions was removed in
+https://github.com/Subsurface-divelog/subsurface/pull/2737,
+but it's a non-trivial backport, and master currently isn't really ready
+for a release.
+
+So instead ship a patch fixing the one broken libgit2 conditional until
+a 4.10 release has been made.
+
+Note the inverted logic - the if branch now handles the old libgit
+condition, and the else branch the newer versions, consistent with how
+it's done in the rest of the subsurface codebase.
+---
+ core/git-access.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/core/git-access.c b/core/git-access.c
+index 3688cb90c..9997fc8fd 100644
+--- a/core/git-access.c
++++ b/core/git-access.c
+@@ -359,10 +359,10 @@ static int try_to_git_merge(git_repository *repo, git_reference **local_p, git_r
+ 	}
+ 
+ 	git_merge_init_options(&merge_options, GIT_MERGE_OPTIONS_VERSION);
+-#if !LIBGIT2_VER_MAJOR && LIBGIT2_VER_MINOR > 23
+-	merge_options.flags = GIT_MERGE_FIND_RENAMES;
+-#else
++#if !LIBGIT2_VER_MAJOR && LIBGIT2_VER_MINOR <= 22
+ 	merge_options.tree_flags = GIT_MERGE_TREE_FIND_RENAMES;
++#else
++	merge_options.flags = GIT_MERGE_FIND_RENAMES;
+ #endif
+ 	merge_options.file_favor = GIT_MERGE_FILE_FAVOR_UNION;
+ 	merge_options.rename_threshold = 100;
+-- 
+2.25.1
+
diff --git a/pkgs/applications/misc/subsurface/default.nix b/pkgs/applications/misc/subsurface/default.nix
index 040a269d62f2..d262fb74c4b5 100644
--- a/pkgs/applications/misc/subsurface/default.nix
+++ b/pkgs/applications/misc/subsurface/default.nix
@@ -4,16 +4,22 @@
 }:
 
 let
-  version = "4.8.2";
+  version = "4.9.3";
+
+  subsurfaceSrc = (fetchFromGitHub {
+    owner = "Subsurface-divelog";
+    repo = "subsurface";
+    rev = "v${version}";
+    sha256 = "1i07f7appifx9j205x5a7ng01wsipxr6n9a3692pm60jli2nsir5";
+    fetchSubmodules = true;
+  });
 
   libdc = stdenv.mkDerivation {
     pname = "libdivecomputer-ssrf";
     inherit version;
 
-    src = fetchurl {
-      url = "https://subsurface-divelog.org/downloads/libdivecomputer-subsurface-branch-${version}.tgz";
-      sha256 = "167qan59raibmilkc574gdqxfjg2f5ww2frn86xzk2kn4qg8190w";
-    };
+    src = subsurfaceSrc;
+    sourceRoot = "source/libdivecomputer";
 
     nativeBuildInputs = [ autoreconfHook ];
 
@@ -70,10 +76,10 @@ in stdenv.mkDerivation {
   pname = "subsurface";
   inherit version;
 
-  src = fetchurl {
-    url = "https://subsurface-divelog.org/downloads/Subsurface-${version}.tgz";
-    sha256 = "1fzrq6rqb6pzs36wxar2453cl509dqpcy9w7nq4gw7b1v2331wfy";
-  };
+  src = subsurfaceSrc;
+
+  # remove with the 4.10 release
+  patches = [ ./0001-core-fix-libgit-ifdef-to-handle-libgit2-v1.0-and-onw.patch ];
 
   buildInputs = [
     libdc googlemaps