about summary refs log tree commit diff
path: root/pkgs/applications/graphics/write_stylus
diff options
context:
space:
mode:
authorSerhii Khoma <srghma@gmail.com>2019-09-24 11:45:32 +0300
committerSerhii Khoma <srghma@gmail.com>2019-09-24 12:17:15 +0300
commite92866d74f3a795dc4b6f50d53815b50dab01b37 (patch)
tree66df4b1b142ec446531144e07780c428cc9001ae /pkgs/applications/graphics/write_stylus
parent5426932f7c664a8765d6904af20ef21310e95d4f (diff)
write_stylus: fix error "cannot download icon.tar.gz from any mirror"
error message was

```
trying https://oyra.eu/write/icon.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
error: cannot download icon.tar.gz from any mirror
```
Diffstat (limited to 'pkgs/applications/graphics/write_stylus')
-rw-r--r--pkgs/applications/graphics/write_stylus/default.nix20
1 files changed, 9 insertions, 11 deletions
diff --git a/pkgs/applications/graphics/write_stylus/default.nix b/pkgs/applications/graphics/write_stylus/default.nix
index 232eeeb01153c..0f1020b0b0784 100644
--- a/pkgs/applications/graphics/write_stylus/default.nix
+++ b/pkgs/applications/graphics/write_stylus/default.nix
@@ -1,4 +1,12 @@
 { stdenv, lib, qtbase, qtsvg, libglvnd, fetchurl, makeDesktopItem }:
+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
 stdenv.mkDerivation rec {
   pname = "write_stylus";
   version = "209";
@@ -7,7 +15,7 @@ stdenv.mkDerivation rec {
     name = "Write";
     exec = "Write";
     comment = "A word processor for handwriting";
-    icon = "write_stylus";
+    icon = desktopIcon;
     desktopName = "Write";
     genericName = "Write";
     categories = "Office;Graphics";
@@ -18,13 +26,6 @@ stdenv.mkDerivation rec {
     sha256 = "1p6glp4vdpwl8hmhypayc4cvs3j9jfmjfhhrgqm2xkgl5bfbv2qd";
   };
 
-  # taken from: https://www.iconfinder.com/icons/50835/edit_pencil_write_icon
-  # license: Free for commercial use
-  icon = fetchurl {
-    url = "https://oyra.eu/write/icon.tar.gz";
-    sha256 = "1zd98g63apwi17qc1hm1g14maain5d18g4afadxm30qjz2s0mvs8";
-  };
-
   sourceRoot = ".";
 
   dontBuild = true;
@@ -35,9 +36,6 @@ stdenv.mkDerivation rec {
     # symlink the binary to bin/
     ln -s $out/Write/Write $out/bin/Write
 
-    # untar icons
-    tar -xzf ${icon} *.tar.gz -C $out/
-
     mkdir -p $out/share/applications
     ln -s ${desktopItem}/share/applications/* $out/share/applications/
   '';