Skip to content

Commit

Permalink
configurable-http-proxy: use buildNpmPackage
Browse files Browse the repository at this point in the history
  • Loading branch information
dotlambda committed Aug 20, 2023
1 parent 2e86fde commit 936d4b5
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 62 deletions.
1 change: 1 addition & 0 deletions pkgs/development/node-packages/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ mapAliases {
inherit (pkgs) carto; # added 2023-08-17
castnow = pkgs.castnow; # added 2023-07-30
inherit (pkgs) clean-css-cli; # added 2023-08-18
inherit (pkgs) configurable-http-proxy; # added 2023-08-19
eask = pkgs.eask; # added 2023-08-17
inherit (pkgs.elmPackages) elm-test;
eslint_d = pkgs.eslint_d; # Added 2023-05-26
Expand Down
1 change: 0 additions & 1 deletion pkgs/development/node-packages/node-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
, "coffee-script"
, "coinmon"
, "concurrently"
, "configurable-http-proxy"
, "conventional-changelog-cli"
, "cordova"
, "cpy-cli"
Expand Down
59 changes: 0 additions & 59 deletions pkgs/development/node-packages/node-packages.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pkgs/development/python-modules/jupyterhub/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
, beautifulsoup4
, buildPythonPackage
, certipy
, configurable-http-proxy
, cryptography
, entrypoints
, fetchPypi
Expand Down Expand Up @@ -96,11 +97,11 @@ buildPythonPackage rec {
substituteInPlace jupyterhub/proxy.py --replace \
"'configurable-http-proxy'" \
"'${nodePackages.configurable-http-proxy}/bin/configurable-http-proxy'"
"'${configurable-http-proxy}/bin/configurable-http-proxy'"
substituteInPlace jupyterhub/tests/test_proxy.py --replace \
"'configurable-http-proxy'" \
"'${nodePackages.configurable-http-proxy}/bin/configurable-http-proxy'"
"'${configurable-http-proxy}/bin/configurable-http-proxy'"
substituteInPlace setup.py --replace \
"'npm'" "'true'"
Expand Down
29 changes: 29 additions & 0 deletions pkgs/tools/networking/configurable-http-proxy/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{ lib
, buildNpmPackage
, fetchFromGitHub
}:

buildNpmPackage rec {
pname = "configurable-http-proxy";
version = "4.5.6";

src = fetchFromGitHub {
owner = "jupyterhub";
repo = "configurable-http-proxy";
rev = version;
hash = "sha256-nj6+GmBw5YSQs23rWVh3qU4jdzRdbPyx43QmZ3LRwn4=";
};

npmDepsHash = "sha256-3HzVI7L1BH9PEBcb7CWWRQqWdSlWiCTo0qqnlSHGn7Y=";

dontNpmBuild = true;

meta = {
changelog = "https://github.com/jupyterhub/configurable-http-proxy/blob/${src.rev}/CHANGELOG.md";
description = "A configurable-on-the-fly HTTP Proxy";
homepage = "https://github.com/jupyterhub/configurable-http-proxy";
license = lib.licenses.bsd3;
mainProgram = "configurable-http-proxy";
maintainers = with lib.maintainers; [ ixxie ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1672,6 +1672,8 @@ with pkgs;

colorless = callPackage ../tools/misc/colorless { };

configurable-http-proxy = callPackage ../tools/networking/configurable-http-proxy { };

cope = callPackage ../tools/misc/cope { };

crypto-tracker = callPackage ../tools/misc/crypto-tracker { };
Expand Down

0 comments on commit 936d4b5

Please sign in to comment.