Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configurable-http-proxy: use buildNpmPackage #250203

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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