From ea675c881847e24451e80cf5d999391880812d75 Mon Sep 17 00:00:00 2001 From: Abel Luck Date: Thu, 26 Feb 2026 13:58:46 +0100 Subject: [PATCH] export the nix-cache worker as a package --- flake.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/flake.nix b/flake.nix index 6e49ac6..2f84f54 100644 --- a/flake.nix +++ b/flake.nix @@ -11,6 +11,22 @@ forAllSystems = fn: nixpkgs.lib.genAttrs systems (system: fn nixpkgs.legacyPackages.${system}); in { + packages = forAllSystems (pkgs: { + nix-cache = pkgs.buildNpmPackage { + pname = "nix-cache"; + version = "0.1.0"; + src = ./nix-cache; + npmDepsHash = "sha256-bIujU7pZa1ExCZOMOoxsTeLDSF1GuPN/oMSgiMhY/04="; + buildPhase = '' + npx wrangler deploy --dry-run --outdir dist + ''; + installPhase = '' + mkdir -p $out + cp dist/index.js $out/ + ''; + }; + }); + checks = forAllSystems (pkgs: { nix-cache-tests = pkgs.buildNpmPackage { pname = "nix-cache-tests";