2020-07-29 20:27:41 +01:00
|
|
|
{ mkDerivation, stdenv, lib, qtbase, qtsvg, libglvnd, libX11, libXi, fetchurl, makeDesktopItem }:
|
2019-09-24 09:45:32 +01:00
|
|
|
let
|
2018-07-04 21:15:32 +01:00
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "Write";
|
|
|
|
exec = "Write";
|
2018-07-21 19:20:12 +01:00
|
|
|
comment = "A word processor for handwriting";
|
2020-08-22 20:58:21 +01:00
|
|
|
icon = "write_stylus";
|
2018-07-04 21:15:32 +01:00
|
|
|
desktopName = "Write";
|
|
|
|
genericName = "Write";
|
|
|
|
categories = "Office;Graphics";
|
|
|
|
};
|
2020-08-22 20:58:21 +01:00
|
|
|
in
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "write_stylus";
|
|
|
|
version = "300";
|
2018-07-04 21:15:32 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.styluslabs.com/write/write${version}.tar.gz";
|
2020-08-22 20:58:21 +01:00
|
|
|
sha256 = "0h1wf3af7jzp3f3l8mlnshi83d7a4v4y8nfqfai4lmskyicqlz7c";
|
2018-07-04 21:15:32 +01:00
|
|
|
};
|
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
|
|
|
|
|
2020-08-22 20:58:21 +01:00
|
|
|
# Create desktop item
|
2018-07-04 21:15:32 +01:00
|
|
|
mkdir -p $out/share/applications
|
|
|
|
ln -s ${desktopItem}/share/applications/* $out/share/applications/
|
2020-08-22 20:58:21 +01:00
|
|
|
mkdir -p $out/share/icons
|
|
|
|
ln -s $out/Write/Write144x144.png $out/share/icons/write_stylus.png
|
2018-07-04 21:15:32 +01:00
|
|
|
'';
|
|
|
|
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
|
2020-07-29 20:27:41 +01:00
|
|
|
libglvnd # libGL.so.1
|
|
|
|
libX11 # libX11.so.6
|
|
|
|
libXi # libXi.so.6
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.styluslabs.com/";
|
2020-10-11 06:55:05 +01:00
|
|
|
description = "Write is a word processor for handwriting";
|
2018-07-04 21:15:32 +01:00
|
|
|
platforms = platforms.linux;
|
2021-01-15 13:21:58 +00:00
|
|
|
license = lib.licenses.unfree;
|
2018-07-04 21:15:32 +01:00
|
|
|
maintainers = with maintainers; [ oyren ];
|
|
|
|
};
|
|
|
|
}
|