about summary refs log tree commit diff
path: root/pkgs/by-name/ht
diff options
context:
space:
mode:
authorRobert Schütz <nix@dotlambda.de>2024-01-20 20:33:50 -0800
committerGitHub <noreply@github.com>2024-01-20 20:33:50 -0800
commit8648bdc9cb283b7a3df4f0bfd0d87409b7670ad6 (patch)
treef77fc2f88353f244a145a11011d0d0f4b14677c4 /pkgs/by-name/ht
parent28dbc86c498e4da9a4e44949e82a583627273319 (diff)
parentfe61cef1ba7cb4f5c668fb9caa178433f5fd4a7f (diff)
downloadnixlib-8648bdc9cb283b7a3df4f0bfd0d87409b7670ad6.tar
nixlib-8648bdc9cb283b7a3df4f0bfd0d87409b7670ad6.tar.gz
nixlib-8648bdc9cb283b7a3df4f0bfd0d87409b7670ad6.tar.bz2
nixlib-8648bdc9cb283b7a3df4f0bfd0d87409b7670ad6.tar.lz
nixlib-8648bdc9cb283b7a3df4f0bfd0d87409b7670ad6.tar.xz
nixlib-8648bdc9cb283b7a3df4f0bfd0d87409b7670ad6.tar.zst
nixlib-8648bdc9cb283b7a3df4f0bfd0d87409b7670ad6.zip
Merge pull request #250265 from dotlambda/http-server-buildNpmPackage
http-server: use buildNpmPackage
Diffstat (limited to 'pkgs/by-name/ht')
-rw-r--r--pkgs/by-name/ht/http-server/package.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/by-name/ht/http-server/package.nix b/pkgs/by-name/ht/http-server/package.nix
new file mode 100644
index 000000000000..9a058ac255ba
--- /dev/null
+++ b/pkgs/by-name/ht/http-server/package.nix
@@ -0,0 +1,38 @@
+{ lib
+, buildNpmPackage
+, fetchFromGitHub
+, fetchpatch2
+}:
+
+buildNpmPackage rec {
+  pname = "http-server";
+  version = "14.1.1";
+
+  src = fetchFromGitHub {
+    owner = "http-party";
+    repo = "http-server";
+    rev = "v${version}";
+    hash = "sha256-M/YC721QWJfz5sYX6RHm1U9WPHVRBD0ZL2/ceYItnhs=";
+  };
+
+  patches = [
+    # https://github.com/http-party/http-server/pull/875
+    (fetchpatch2 {
+      name = "regenerate-package-lock.patch";
+      url = "https://github.com/http-party/http-server/commit/0cbd85175f1a399c4d13c88a25c5483a9f1dea08.patch";
+      hash = "sha256-hJyiUKZfuSaXTsjFi4ojdaE3rPHgo+N8k5Hqete+zqk=";
+    })
+  ];
+
+  npmDepsHash = "sha256-iUTDdcibnstbSxC7cD5WbwSxQbfiIL2iNyMWJ8izSu0=";
+
+  dontNpmBuild = true;
+
+  meta = {
+    description = "A simple zero-configuration command-line http server";
+    homepage = "https://github.com/http-party/http-server";
+    license = lib.licenses.mit;
+    mainProgram = "http-server";
+    maintainers = with lib.maintainers; [ ];
+  };
+}