11 generic = { version, sha256, platform ? "", jdk, ... }@attrs:
13 desktopItem = makeDesktopItem {
14 categories = [ "Network" "Development" "WebDevelopment" "Java" ];
15 desktopName = "Charles";
17 genericName = "Web Debugging Proxy";
18 icon = "charles-proxy";
20 "application/x-charles-savedsession"
21 "application/x-charles-savedsession+xml"
22 "application/x-charles-savedsession+json"
23 "application/har+json"
24 "application/vnd.tcpdump.pcap"
25 "application/x-charles-trace"
31 in stdenv.mkDerivation {
36 url = "https://www.charlesproxy.com/assets/release/${version}/charles-proxy-${version}${platform}.tar.gz";
37 curlOptsList = [ "--user-agent" "Mozilla/5.0" ]; # HTTP 104 otherwise
40 nativeBuildInputs = [ makeWrapper ];
43 makeWrapper ${jdk}/bin/java $out/bin/charles \
44 --add-flags "-Xmx1024M -Dcharles.config='~/.charles.config' -jar $out/share/java/charles.jar"
46 for fn in lib/*.jar; do
47 install -D -m644 $fn $out/share/java/$(basename $fn)
50 mkdir -p $out/share/applications
51 ln -s ${desktopItem}/share/applications/* $out/share/applications/
53 mkdir -p $out/share/icons
54 cp -r icon $out/share/icons/hicolor
58 description = "Web Debugging Proxy";
59 homepage = "https://www.charlesproxy.com/";
60 maintainers = with maintainers; [ kalbasit kashw2 ];
61 sourceProvenance = with sourceTypes; [ binaryBytecode ];
62 license = licenses.unfree;
63 platforms = platforms.unix;
70 sha256 = "KEQYb90kt41dS3TJLZqdaV9P3mQA9UPsEyiFb/knm3w=";
76 sha256 = "13zk82ny1w5zd9qcs9qkq0kdb22ni5byzajyshpxdfm4zv6p32ss";
78 mainProgram = "charles";