Merge pull request #43502 from kalbasit/add-charles

charles: init at 4.2.6
This commit is contained in:
adisbladis 2018-07-14 17:51:09 +08:00 committed by GitHub
commit e8ec91bb59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 55 additions and 0 deletions

View File

@ -1929,6 +1929,11 @@
github = "kaiha";
name = "Kai Harries";
};
kalbasit = {
email = "wael.nasreddine@gmail.com";
github = "kalbasit";
name = "Wael Nasreddine";
};
kamilchm = {
email = "kamil.chm@gmail.com";
github = "kamilchm";

View File

@ -0,0 +1,48 @@
{ stdenv, fetchurl, makeDesktopItem, jre, makeWrapper }:
let
desktopItem = makeDesktopItem {
categories = "Network;Development;WebDevelopment;Java;";
desktopName = "Charles";
exec = "charles %F";
genericName = "Web Debugging Proxy";
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";
};
in stdenv.mkDerivation rec {
name = "charles-${version}";
version = "4.2.6";
src = fetchurl {
url = "https://www.charlesproxy.com/assets/release/${version}/charles-proxy-${version}.tar.gz";
sha256 = "1hjfimyr9nnbbxadwni02d2xl64ybarh42l1g6hlslq5qwl8ywzb";
};
buildInputs = [ makeWrapper ];
installPhase = ''
makeWrapper ${jre}/bin/java $out/bin/charles \
--add-flags "-Xmx1024M -Dcharles.config='~/.charles.config' -jar $out/share/java/charles.jar"
for fn in lib/*.jar; do
install -D -m644 $fn $out/share/java/$(basename $fn)
done
mkdir -p $out/share/applications
ln -s ${desktopItem}/share/applications/* $out/share/applications/
mkdir -p $out/share/icons
cp -r icon $out/share/icons/hicolor
'';
meta = with stdenv.lib; {
description = "Web Debugging Proxy";
homepage = https://www.charlesproxy.com/;
maintainers = [ maintainers.kalbasit ];
license = stdenv.lib.licenses.unfree;
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
};
}

View File

@ -848,6 +848,8 @@ with pkgs;
bluemix-cli = callPackage ../tools/admin/bluemix-cli { };
charles = callPackage ../applications/networking/charles { };
libqmatrixclient = libsForQt5.callPackage ../development/libraries/libqmatrixclient { };
quaternion = libsForQt5.callPackage ../applications/networking/instant-messengers/quaternion { };