From 41451c6dd8640dfd84c013a1dbba3ffa21128edf Mon Sep 17 00:00:00 2001 From: sterni Date: Sun, 27 Feb 2022 16:39:37 +0100 Subject: feat(3p): add napalm 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 Tested-by: BuildkiteCI --- third_party/napalm/default.nix | 7 +++++++ third_party/sources/sources.json | 12 ++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 third_party/napalm/default.nix diff --git a/third_party/napalm/default.nix b/third_party/napalm/default.nix new file mode 100644 index 0000000000..e85c360ba9 --- /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 d2bf07c0ac..11626b05ee 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///archive/.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///archive/.tar.gz" + }, "nixpkgs": { "branch": "nixos-unstable", "description": "Nix Packages collection", -- cgit 1.4.1