mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
simplify the build phase
This commit is contained in:
parent
c32cea4762
commit
fdf7402e3a
@ -6,7 +6,7 @@ let
|
|||||||
desktopName = "Charles";
|
desktopName = "Charles";
|
||||||
exec = "charles %F";
|
exec = "charles %F";
|
||||||
genericName = "Web Debugging Proxy";
|
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";
|
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";
|
name = "Charles";
|
||||||
startupNotify = "true";
|
startupNotify = "true";
|
||||||
@ -22,14 +22,8 @@ in stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
set -e
|
|
||||||
|
|
||||||
mkdir -pv $out/bin
|
mkdir -pv $out/bin
|
||||||
|
|
||||||
for fn in lib/*.jar; do
|
|
||||||
install -D -m644 $fn $out/$fn
|
|
||||||
done
|
|
||||||
|
|
||||||
cat > $out/bin/charles << EOF
|
cat > $out/bin/charles << EOF
|
||||||
#!${stdenv.shell}
|
#!${stdenv.shell}
|
||||||
|
|
||||||
@ -38,20 +32,15 @@ in stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
chmod +x $out/bin/charles
|
chmod +x $out/bin/charles
|
||||||
|
|
||||||
|
for fn in lib/*.jar; do
|
||||||
|
install -D -m644 $fn $out/$fn
|
||||||
|
done
|
||||||
|
|
||||||
mkdir -p $out/share/applications
|
mkdir -p $out/share/applications
|
||||||
ln -s ${desktopItem}/share/applications/* $out/share/applications/
|
ln -s ${desktopItem}/share/applications/* $out/share/applications/
|
||||||
|
|
||||||
for dim in 16x16 32x32 64x64 128x128 256x256 512x512; do
|
mkdir -p $out/share/icons
|
||||||
install -D -m644 icon/$dim/apps/charles-proxy.png \
|
cp -r icon $out/share/icons/hicolor
|
||||||
$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
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user