Code change:
<ins> { lib, stdenv, buildNpmPackage, fetchFromGitHub, makeWrapper, makeDesktopItem, copyDesktopItems, electron, httptoolkit-server, }: buildNpmPackage rec { pname = "httptoolkit"; version = "1.19.0"; src = fetchFromGitHub { owner = "httptoolkit"; repo = "httptoolkit-desktop"; rev = "refs/tags/v${version}"; hash = "sha256-e+ngBZMwMTvwzY1K7IaxlNoRkZUPDdJvKxvxuCsc9pw="; }; npmDepsHash = "sha256-XgJIs4P1ezCEPPitIIfYpNkX0/3dPdajeIiDwHm7DSU="; env = { ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; # disable code signing on Darwin CSC_IDENTITY_AUTO_DISCOVERY = "false"; }; nativeBuildInputs = [ makeWrapper ] ++ lib.optionals stdenv.isLinux [ copyDesktopItems ]; npmBuildScript = "build:src"; postBuild = '' substituteInPlace package.json --replace-fail  '"forceCodeSigning": true'  '"forceCodeSigning": false' cp -r ${electron.dist} electron-dist chmod -R u+w electron-dist npm exec electron-builder --  --dir  -c.electronDist=electron-dist  -c.electronVersion=${electron.version} ''; installPhase = '' runHook preInstall ${lib.optionalString stdenv.isLinux '' mkdir -p $out/share/httptoolkit cp -r dist/*-unpacked/{locales,resources{,.pak}} $out/share/httptoolkit ln -s ${httptoolkit-server} $out/share/httptoolkit/resources/httptoolkit-server install -Dm644 src/icons/icon.svg $out/share/icons/hicolor/scalable/apps/httptoolkit.svg makeWrapper ${lib.getExe electron} $out/bin/httptoolkit  --add-flags $out/share/httptoolkit/resources/app.asar  --add-flags "''${NIXOS_OZONE_WL:+''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"  --inherit-argv0 ''} ${lib.optionalString stdenv.isDarwin '' mkdir -p $out/Applications cp -r dist/mac*/"HTTP Toolkit.app" $out/Applications ln -s ${httptoolkit-server} "$out/Applications/HTTP Toolkit.app/Contents/Resources/httptoolkit-server" makeWrapper "$out/Applications/HTTP Toolkit.app/Contents/MacOS/HTTP Toolkit" $out/bin/httptoolkit ''} runHook postInstall ''; desktopItems = [ (makeDesktopItem { name = "httptoolkit"; desktopName = "HTTP Toolkit"; exec = "httptoolkit %U"; terminal = false; icon = "httptoolkit"; startupWMClass = "HTTP Toolkit"; comment = meta.description; categories = [ "Development" ]; startupNotify = true; }) ]; meta = { description = "HTTP(S) debugging, development & testing tool"; homepage = "https://httptoolkit.com/"; license = lib.licenses.agpl3Plus; mainProgram = "httptoolkit"; maintainers = with lib.maintainers; [ tomasajt ]; platforms = electron.meta.platforms; }; } </ins>

Related discussion:
text: HTTP Toolkit is an open-source tool for debugging, testing and building with HTTP(S) on Windows, Linux & Mac. Metadata homepage URL: source URL: license: AGPL v3.0 platforms: linux, darwin
Sorry, wasn't able to get it working. The httptoolkit-server is the difficult part. I tried building from source, however one of the dependencies tries to npm install more stuff in prebuild, so it wasn't building properly. I tried packaging the prebuilt binary but it's trying to do some auto updating and also package node with itself. I could have patched this when building from source, however the prebuilt one is minified & obfuscated so I couldn't do that.
Have you a branch to continue the work ?
+1
I've started a small bounty of 20$ on this: It's not much but it would be great to have this tool on nix!
I made another attempt at packaging this and I'm pretty close to getting httptoolkit-server to compile from source. This should help with patching out stuff, since we can do it before it gets obfuscated.
if anyone needs to run this on nix the appimage provided by HttpToolkit works pretty well on nix with no extra dependencies. See and then Would still be great to have this as a nix package though.
Hey thanks for adding this! You can claim the gitpay bounty here: (I've tried to find your email to invite you but didn't have much luck) or email me at
Sent you an email,