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";