about summary refs log tree commit diff
path: root/pkgs/applications/graphics/write_stylus
diff options
context:
space:
mode:
authoroyren <m.scheuren@oyra.eu>2018-07-04 22:15:32 +0200
committeroyren <m.scheuren@oyra.eu>2018-07-04 22:15:32 +0200
commit4f84814208a6f536ab9dea5f460cd88b6f7d2bb5 (patch)
tree5253b0e4d64013ffcdee12e4f49f48d612ad5edd /pkgs/applications/graphics/write_stylus
parent2fa3fa023f6bbbbe6447a486e2480793ff8abecf (diff)
downloadnixlib-4f84814208a6f536ab9dea5f460cd88b6f7d2bb5.tar
nixlib-4f84814208a6f536ab9dea5f460cd88b6f7d2bb5.tar.gz
nixlib-4f84814208a6f536ab9dea5f460cd88b6f7d2bb5.tar.bz2
nixlib-4f84814208a6f536ab9dea5f460cd88b6f7d2bb5.tar.lz
nixlib-4f84814208a6f536ab9dea5f460cd88b6f7d2bb5.tar.xz
nixlib-4f84814208a6f536ab9dea5f460cd88b6f7d2bb5.tar.zst
nixlib-4f84814208a6f536ab9dea5f460cd88b6f7d2bb5.zip
write_stylus: init at 209
Diffstat (limited to 'pkgs/applications/graphics/write_stylus')
-rw-r--r--pkgs/applications/graphics/write_stylus/default.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/write_stylus/default.nix b/pkgs/applications/graphics/write_stylus/default.nix
new file mode 100644
index 000000000000..a1c39fadb59d
--- /dev/null
+++ b/pkgs/applications/graphics/write_stylus/default.nix
@@ -0,0 +1,52 @@
+{ stdenv, lib, qtbase, qtsvg,  makeWrapper, fetchurl, makeDesktopItem }:
+stdenv.mkDerivation rec {
+  name = "write_stylus-${version}";
+  version = "209";
+
+  desktopItem = makeDesktopItem {
+    name = "Write";
+    exec = "Write";
+    comment = "a word processor for hadwriting";
+    desktopName = "Write";
+    genericName = "Write";
+    categories = "Office;Graphics";
+  };
+
+  src = fetchurl {
+    url = "http://www.styluslabs.com/write/write${version}.tar.gz";
+    sha256 = "1p6glp4vdpwl8hmhypayc4cvs3j9jfmjfhhrgqm2xkgl5bfbv2qd";
+  };
+  sourceRoot = ".";
+
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp -R Write $out/
+    # symlink the binary to bin/
+    ln -s $out/Write/Write $out/bin/Write
+
+    mkdir -p $out/share/applications
+    ln -s ${desktopItem}/share/applications/* $out/share/applications/
+  '';
+  preFixup = let
+    libPath = lib.makeLibraryPath [
+      qtbase        # libQt5PrintSupport.so.5
+      qtsvg         # libQt5Svg.so.5
+      stdenv.cc.cc.lib  # libstdc++.so.6
+    ];
+  in ''
+    patchelf \
+      --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+      --set-rpath "${libPath}" \
+      $out/Write/Write
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://www.styluslabs.com/;
+    description = "Write is a word processor for handwriting.";
+    platforms = platforms.linux;
+    license = stdenv.lib.licenses.unfree;
+    maintainers = with maintainers; [ oyren ];
+  };
+}