13 stdenv.mkDerivation (finalAttrs: {
14 pname = "styluslabs-write";
15 version = "2024-10-12";
17 src = fetchFromGitHub {
20 rev = "b13572e2dd6a87af35cd3edde92c9144a6dd8a2b";
21 hash = "sha256-cL6jU54LTkYu0mLNOgSDgChkDdg7eQaM00hTMas6cTg=";
22 fetchSubmodules = true;
24 # Delete .git folder for better reproducibility
25 # TODO: fix GITCOUNT is always 1 but is not used in Linux Build anyway
28 git rev-parse --short HEAD > $out/GITREV
29 git rev-list --count HEAD > $out/GITCOUNT
34 hardeningDisable = [ "format" ];
41 "GITREV=$(cat ./GITREV)"
42 "GITCOUNT=$(cat ./GITCOUNT)"
68 mkdir -p $out/{bin,opt}
69 install -m555 -D syncscribble/Release/Write $out/opt/
70 install -m444 -D scribbleres/Intro.svg $out/opt/
71 install -m444 -D scribbleres/fonts/DroidSansFallback.ttf $out/opt/
72 ln -s ${roboto}/share/fonts/truetype/Roboto-Regular.ttf $out/opt/Roboto-Regular.ttf
74 ln -s ../opt/Write $out/bin/Write
76 for i in 16 24 48 64 96 128 256 512; do
77 mkdir -p $out/share/icons/hicolor/''${i}x''${i}/apps
78 magick scribbleres/write_512.png -resize ''${i}x''${i} $out/share/icons/hicolor/''${i}x''${i}/apps/${finalAttrs.pname}.png
81 install -Dm444 scribbleres/linux/Write.desktop -t $out/share/applications
82 substituteInPlace $out/share/applications/Write.desktop \
83 --replace-fail 'Exec=/opt/Write/Write' 'Exec=Write' \
84 --replace-fail 'Icon=Write144x144' 'Icon=${finalAttrs.pname}'
87 enableParallelBuilding = true;
90 homepage = "https://styluslabs.com/";
91 description = "Cross-platform (Windows, Mac, Linux, iOS, Android) application for handwritten notes";
92 license = with lib.licenses; [
93 # miniz, pugixml, stb, ugui, ulib, usvg
97 # styluslabs-write itself
100 maintainers = with lib.maintainers; [
104 platforms = with lib.platforms; linux ++ darwin ++ windows;
105 broken = !stdenv.hostPlatform.isLinux;
106 mainProgram = "Write";