about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2022-02-27T15·39+0100
committersterni <sternenseemann@systemli.org>2022-11-26T15·38+0000
commit41451c6dd8640dfd84c013a1dbba3ffa21128edf (patch)
treefcdffa9e51e50b1f1bd1c56cf1e87dc135f8b3bd
parent7b7a8919b149bf094308aebc414e713a02bd400f (diff)
feat(3p): add napalm r/5332
For another project I need a way to fetch JS dependencies, as I couldn't
avoid them there. napalm seems to be the best option for this at the
moment, as the approach of running a local registry system seems to be
more robust than using npm's offline mode (which npmlock2nix) is doing.
If the latter gets better, it may be prudent to switch. napalm is
relatively unproblematic, i.e. no Haskell in IFD.

Change-Id: Icf57d3505a55422681bd90c445bde52fcf5841aa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7289
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
-rw-r--r--third_party/napalm/default.nix7
-rw-r--r--third_party/sources/sources.json12
2 files changed, 19 insertions, 0 deletions
diff --git a/third_party/napalm/default.nix b/third_party/napalm/default.nix
new file mode 100644
index 000000000000..e85c360ba91e
--- /dev/null
+++ b/third_party/napalm/default.nix
@@ -0,0 +1,7 @@
+{ depot, pkgs, ... }:
+
+pkgs.callPackage depot.third_party.sources.napalm { } // {
+  meta.ci.targets = [
+    "napalm-registry"
+  ];
+}
diff --git a/third_party/sources/sources.json b/third_party/sources/sources.json
index d2bf07c0acfa..11626b05ee79 100644
--- a/third_party/sources/sources.json
+++ b/third_party/sources/sources.json
@@ -59,6 +59,18 @@
         "url": "https://github.com/nmattia/naersk/archive/6944160c19cb591eb85bbf9b2f2768a935623ed3.tar.gz",
         "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
     },
+    "napalm": {
+        "branch": "master",
+        "description": "Support for building npm packages in Nix and lightweight npm registry [maintainer @nmattia]",
+        "homepage": "",
+        "owner": "nix-community",
+        "repo": "napalm",
+        "rev": "dcb6e93c8b6945dc854bdce691a1bf99c8b701ca",
+        "sha256": "1hswnadvyf01x1m4i1b4ymxrcwy9my7bmj26nyl0bjmmq3j7fi7p",
+        "type": "tarball",
+        "url": "https://github.com/nix-community/napalm/archive/dcb6e93c8b6945dc854bdce691a1bf99c8b701ca.tar.gz",
+        "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
+    },
     "nixpkgs": {
         "branch": "nixos-unstable",
         "description": "Nix Packages collection",