diff options
author | Wael M. Nasreddine <wael.nasreddine@gmail.com> | 2018-07-13 16:11:43 -0700 |
---|---|---|
committer | Wael M. Nasreddine <wael.nasreddine@gmail.com> | 2018-07-13 16:11:43 -0700 |
commit | f3bf0026a220ba2270977e22e94286bf1a6f7e65 (patch) | |
tree | 012db74e6bb1d7a8923d5a7393317b620f743e16 /pkgs | |
parent | 5457be89fe65e302b0fefcbacbcdd52ef27f1c70 (diff) |
charles: init at 4.2.6
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/networking/charles/default.nix | 64 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 6 |
2 files changed, 68 insertions, 2 deletions
diff --git a/pkgs/applications/networking/charles/default.nix b/pkgs/applications/networking/charles/default.nix new file mode 100644 index 000000000000..c71237b21600 --- /dev/null +++ b/pkgs/applications/networking/charles/default.nix @@ -0,0 +1,64 @@ +{ stdenv, fetchurl, makeDesktopItem, jre, hicolor-icon-theme }: + +let + desktopItem = makeDesktopItem { + categories = "Network;Development;WebDevelopment;Java;"; + desktopName = "Charles"; + exec = "charles %F"; + genericName = "Web Debugging Proxy"; + icon = "charles"; + 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"; + }; + + 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} + + ${jre}/bin/java -Xmx1024M -Dcharles.config="~/.charles.config" -Djava.library.path="$out/lib" -jar $out/lib/charles.jar $* + EOF + + chmod +x $out/bin/charles + + 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 + ''; + + 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 47e54f0f804e..fe4836fb713b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { }; @@ -3718,7 +3720,7 @@ with pkgs; lzip = callPackage ../tools/compression/lzip { }; luxcorerender = callPackage ../tools/graphics/luxcorerender { }; - + xz = callPackage ../tools/compression/xz { }; lz4 = callPackage ../tools/compression/lz4 { }; @@ -4987,7 +4989,7 @@ with pkgs; securefs = callPackage ../tools/filesystems/securefs { }; seexpr = callPackage ../development/compilers/seexpr { }; - + setroot = callPackage ../tools/X11/setroot { }; setserial = callPackage ../tools/system/setserial { }; |