From fdf7402e3a49d6b2097f881c50721df9588bd666 Mon Sep 17 00:00:00 2001 From: "Wael M. Nasreddine" Date: Fri, 13 Jul 2018 22:28:27 -0700 Subject: [PATCH] simplify the build phase --- .../networking/charles/default.nix | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/pkgs/applications/networking/charles/default.nix b/pkgs/applications/networking/charles/default.nix index c71237b21600..e18718025cf6 100644 --- a/pkgs/applications/networking/charles/default.nix +++ b/pkgs/applications/networking/charles/default.nix @@ -6,7 +6,7 @@ let desktopName = "Charles"; exec = "charles %F"; genericName = "Web Debugging Proxy"; - icon = "charles"; + icon = "charles-proxy"; mimeType = "application/x-charles-savedsession;application/x-charles-savedsession+xml;application/x-charles-savedsession+json;application/har+json;application/vnd.tcpdump.pcap;application/x-charles-trace"; name = "Charles"; startupNotify = "true"; @@ -22,14 +22,8 @@ in stdenv.mkDerivation rec { }; installPhase = '' - set -e - mkdir -pv $out/bin - for fn in lib/*.jar; do - install -D -m644 $fn $out/$fn - done - cat > $out/bin/charles << EOF #!${stdenv.shell} @@ -38,20 +32,15 @@ in stdenv.mkDerivation rec { chmod +x $out/bin/charles + for fn in lib/*.jar; do + install -D -m644 $fn $out/$fn + done + mkdir -p $out/share/applications ln -s ${desktopItem}/share/applications/* $out/share/applications/ - for dim in 16x16 32x32 64x64 128x128 256x256 512x512; do - install -D -m644 icon/$dim/apps/charles-proxy.png \ - $out/share/icons/hicolor/$dim/apps/charles.png - for mimetype in application-har+json.png application-vnd.tcpdump.pcap.png application-x-charles-savedsession.png application-x-charles-trace.png; do - install -D -m644 icon/$dim/mimetypes/$mimetype \ - $out/share/icons/hicolor/$dim/mimetypes/$mimetype - done - done - - install -D -m644 doc/licenses/bounce-license.txt \ - $out/share/licenses/bounce-license.txt + mkdir -p $out/share/icons + cp -r icon $out/share/icons/hicolor ''; meta = with stdenv.lib; {