2018-11-15 14:55:05 +01:00
|
|
|
{ stdenv, lib, qtbase, qtsvg, libglvnd, fetchurl, makeDesktopItem }:
|
2018-07-04 22:15:32 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "write_stylus";
|
2018-07-04 22:15:32 +02:00
|
|
|
version = "209";
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "Write";
|
|
|
|
exec = "Write";
|
2018-07-21 20:20:12 +02:00
|
|
|
comment = "A word processor for handwriting";
|
|
|
|
icon = "write_stylus";
|
2018-07-04 22:15:32 +02:00
|
|
|
desktopName = "Write";
|
|
|
|
genericName = "Write";
|
|
|
|
categories = "Office;Graphics";
|
|
|
|
};
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.styluslabs.com/write/write${version}.tar.gz";
|
|
|
|
sha256 = "1p6glp4vdpwl8hmhypayc4cvs3j9jfmjfhhrgqm2xkgl5bfbv2qd";
|
|
|
|
};
|
2018-07-21 20:20:12 +02:00
|
|
|
|
|
|
|
# taken from: https://www.iconfinder.com/icons/50835/edit_pencil_write_icon
|
|
|
|
# license: Free for commercial use
|
|
|
|
icon = fetchurl {
|
|
|
|
url = "https://oyra.eu/write/icon.tar.gz";
|
|
|
|
sha256 = "1zd98g63apwi17qc1hm1g14maain5d18g4afadxm30qjz2s0mvs8";
|
|
|
|
};
|
|
|
|
|
2018-07-04 22:15:32 +02:00
|
|
|
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
|
|
|
|
|
2018-07-21 20:20:12 +02:00
|
|
|
# untar icons
|
|
|
|
tar -xzf ${icon} *.tar.gz -C $out/
|
|
|
|
|
2018-07-04 22:15:32 +02:00
|
|
|
mkdir -p $out/share/applications
|
|
|
|
ln -s ${desktopItem}/share/applications/* $out/share/applications/
|
|
|
|
'';
|
|
|
|
preFixup = let
|
|
|
|
libPath = lib.makeLibraryPath [
|
2018-11-15 14:55:05 +01:00
|
|
|
qtbase # libQt5PrintSupport.so.5
|
|
|
|
qtsvg # libQt5Svg.so.5
|
2018-07-04 22:15:32 +02:00
|
|
|
stdenv.cc.cc.lib # libstdc++.so.6
|
2018-11-15 14:55:05 +01:00
|
|
|
libglvnd # ibGL.so.1
|
2018-07-04 22:15:32 +02:00
|
|
|
];
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|