Advertisement
Guest User

write

a guest
Jun 25th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. { stdenv, lib, qt5, makeWrapper, fetchurl, makeDesktopItem }:
  2. stdenv.mkDerivation rec {
  3. name = "Stylus-Labs-Write";
  4.  
  5. desktopItem = makeDesktopItem {
  6. name = "write";
  7. exec = "$out/bin/Write";
  8. #icon = "write";
  9. comment = "";
  10. desktopName = "Write";
  11. genericName = "Write";
  12. categories = "Office;Graphics";
  13. };
  14.  
  15. src = fetchurl {
  16. url = "http://www.styluslabs.com/download/write-tgz";
  17. sha256 = "1p6glp4vdpwl8hmhypayc4cvs3j9jfmjfhhrgqm2xkgl5bfbv2qd";
  18. };
  19. sourceRoot = ".";
  20. unpackCmd = ''
  21. tar xfz "$src"
  22. '';
  23.  
  24. buildPhase = ":"; # nothing to build
  25.  
  26. installPhase = ''
  27. mkdir -p $out/bin
  28. cp -R Write $out/
  29. # symlink the binary to bin/
  30. ln -s $out/Write/Write $out/bin/Write
  31. '';
  32. preFixup = let
  33. # we prepare our library path in the let clause to avoid it become part of the input of mkDerivation
  34. libPath = lib.makeLibraryPath [
  35. qt5.qtbase # libQt5PrintSupport.so.5
  36. qt5.qtsvg # libQt5Svg.so.5
  37. stdenv.cc.cc.lib # libstdc++.so.6
  38. ];
  39. in ''
  40. patchelf \
  41. --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
  42. --set-rpath "${libPath}" \
  43. $out/Write/Write
  44. '';
  45.  
  46. meta = with stdenv.lib; {
  47. homepage = http://www.styluslabs.com/;
  48. description = "Write is a word processor for handwriting.";
  49. #license = licenses.proprietary;
  50. platforms = platforms.linux;
  51. maintainers = [ "m.scheuren@oyra.eu" ];
  52. };
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement