simplify the build phase
This commit is contained in:
parent
c32cea4762
commit
fdf7402e3a
@ -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; {
|
||||
|
Loading…
Reference in New Issue
Block a user