2020-04-07 21:26:17 +01:00
|
|
|
{ mkDerivation, stdenv, lib, qtbase, qtsvg, libglvnd, fetchurl, makeDesktopItem }:
|
2019-09-24 09:45:32 +01:00
|
|
|
let
|
|
|
|
# taken from: https://www.iconfinder.com/icons/50835/edit_pencil_write_icon
|
|
|
|
# license: Free for commercial use
|
|
|
|
desktopIcon = fetchurl {
|
|
|
|
url = "https://www.iconfinder.com/icons/50835/download/png/256";
|
|
|
|
sha256 = "0abdya42yf9alxbsmc2nf8jwld50zfria6z3d4ncvp1zw2a9jhb8";
|
|
|
|
};
|
|
|
|
in
|
2020-04-07 21:26:17 +01:00
|
|
|
mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "write_stylus";
|
2018-07-04 21:15:32 +01:00
|
|
|
version = "209";
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "Write";
|
|
|
|
exec = "Write";
|
2018-07-21 19:20:12 +01:00
|
|
|
comment = "A word processor for handwriting";
|
2019-09-24 09:45:32 +01:00
|
|
|
icon = desktopIcon;
|
2018-07-04 21:15:32 +01: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 19:20:12 +01:00
|
|
|
|
2018-07-04 21:15:32 +01: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
|
|
|
|
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
ln -s ${desktopItem}/share/applications/* $out/share/applications/
|
|
|
|
'';
|
|
|
|
preFixup = let
|
|
|
|
libPath = lib.makeLibraryPath [
|
2018-11-15 13:55:05 +00:00
|
|
|
qtbase # libQt5PrintSupport.so.5
|
|
|
|
qtsvg # libQt5Svg.so.5
|
2018-07-04 21:15:32 +01:00
|
|
|
stdenv.cc.cc.lib # libstdc++.so.6
|
2018-11-15 13:55:05 +00:00
|
|
|
libglvnd # ibGL.so.1
|
2018-07-04 21:15:32 +01:00
|
|
|
];
|
|
|
|
in ''
|
|
|
|
patchelf \
|
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath "${libPath}" \
|
|
|
|
$out/Write/Write
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.styluslabs.com/";
|
2018-07-04 21:15:32 +01:00
|
|
|
description = "Write is a word processor for handwriting.";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = stdenv.lib.licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ oyren ];
|
|
|
|
};
|
|
|
|
}
|