about summary refs log tree commit diff
path: root/pkgs/applications/misc/vym
diff options
context:
space:
mode:
authorMicrosoftTakeover <49256525+MicrosoftTakeover@users.noreply.github.com>2019-12-12 14:08:11 -0800
committerRenaud <c0bw3b@users.noreply.github.com>2019-12-12 23:08:11 +0100
commit286ef7108f4f3dff3eb3759284c619199d38fcd6 (patch)
treee1d6f0d1b0f3afc42f64157bdf6618b04f94d0b0 /pkgs/applications/misc/vym
parent2d7b7b805d2704448d5a70f66b162935df3bafaf (diff)
vym: 2.6.11 -> 2.7.0 (#73483)
* vym: 2.6.11 -> 2.7.1

* vym: install man page

* vym: fix /usr paths and move data from $out/vym

* Change version to 2.7.0

There was some concern that the release tarball 2.7.1 actually contains an in-development snapshot rather than a full release. The consensus seems to be that 2.7.0 should be used instead.
Diffstat (limited to 'pkgs/applications/misc/vym')
-rw-r--r--pkgs/applications/misc/vym/default.nix39
1 files changed, 33 insertions, 6 deletions
diff --git a/pkgs/applications/misc/vym/default.nix b/pkgs/applications/misc/vym/default.nix
index 6dfe8e713c633..a5024cb7f36b8 100644
--- a/pkgs/applications/misc/vym/default.nix
+++ b/pkgs/applications/misc/vym/default.nix
@@ -1,18 +1,45 @@
-{ stdenv, fetchurl, pkgconfig, qmake, qtsvg }:
+{ stdenv, mkDerivation, fetchurl, pkgconfig, qmake, qtscript, qtsvg }:
 
-stdenv.mkDerivation rec {
+mkDerivation rec {
   pname = "vym";
-  version = "2.6.11";
+  version = "2.7.0";
 
   src = fetchurl {
-    url = "mirror://sourceforge/project/vym/2.6.0/${pname}-${version}.tar.bz2";
-    sha256 = "1yznlb47jahd662a2blgh1ccwpl5dp5rjz9chsxjzhj3vbkzx3nl";
+    url = "mirror://sourceforge/project/vym/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "1rnrfqlff7wv6yni8bvff8n90pmn82k82zd4sn1jsx9r1n3qsfkh";
   };
 
+  # Hardcoded paths scattered about all have form share/vym
+  # which is encouraging, although we'll need to patch them (below).
+  qmakeFlags = [
+    "DATADIR=${placeholder "out"}/share"
+    "DOCDIR=${placeholder "out"}/share/doc/vym"
+  ];
+
+  postPatch = ''
+    for x in \
+      exportoofiledialog.cpp \
+      main.cpp \
+      mainwindow.cpp \
+      tex/*.{tex,lyx}; \
+    do
+      substituteInPlace $x \
+        --replace /usr/share/vym $out/share/vym \
+        --replace /usr/local/share/vym $out/share/vym \
+        --replace /usr/share/doc $out/share/doc/vym
+    done
+  '';
+
   hardeningDisable = [ "format" ];
 
   nativeBuildInputs = [ pkgconfig qmake ];
-  buildInputs = [ qtsvg ];
+  buildInputs = [ qtscript qtsvg ];
+
+  postInstall = ''
+    install -Dm755 -t $out/share/man/man1 doc/*.1.gz
+  '';
+
+  dontGzipMan = true;
 
   meta = with stdenv.lib; {
     description = "A mind-mapping software";