Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { stdenv, lib, qt5, makeWrapper, fetchurl, makeDesktopItem }:
- stdenv.mkDerivation rec {
- name = "Stylus-Labs-Write";
- desktopItem = makeDesktopItem {
- name = "write";
- exec = "$out/bin/Write";
- #icon = "write";
- comment = "";
- desktopName = "Write";
- genericName = "Write";
- categories = "Office;Graphics";
- };
- src = fetchurl {
- url = "http://www.styluslabs.com/download/write-tgz";
- sha256 = "1p6glp4vdpwl8hmhypayc4cvs3j9jfmjfhhrgqm2xkgl5bfbv2qd";
- };
- sourceRoot = ".";
- unpackCmd = ''
- tar xfz "$src"
- '';
- buildPhase = ":"; # nothing to build
- installPhase = ''
- mkdir -p $out/bin
- cp -R Write $out/
- # symlink the binary to bin/
- ln -s $out/Write/Write $out/bin/Write
- '';
- preFixup = let
- # we prepare our library path in the let clause to avoid it become part of the input of mkDerivation
- libPath = lib.makeLibraryPath [
- qt5.qtbase # libQt5PrintSupport.so.5
- qt5.qtsvg # libQt5Svg.so.5
- stdenv.cc.cc.lib # libstdc++.so.6
- ];
- 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.";
- #license = licenses.proprietary;
- platforms = platforms.linux;
- maintainers = [ "m.scheuren@oyra.eu" ];
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement