export the nix-cache worker as a package
This commit is contained in:
parent
8501f0ac3a
commit
ea675c8818
1 changed files with 16 additions and 0 deletions
16
flake.nix
16
flake.nix
|
|
@ -11,6 +11,22 @@
|
||||||
forAllSystems = fn: nixpkgs.lib.genAttrs systems (system: fn nixpkgs.legacyPackages.${system});
|
forAllSystems = fn: nixpkgs.lib.genAttrs systems (system: fn nixpkgs.legacyPackages.${system});
|
||||||
in
|
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: {
|
checks = forAllSystems (pkgs: {
|
||||||
nix-cache-tests = pkgs.buildNpmPackage {
|
nix-cache-tests = pkgs.buildNpmPackage {
|
||||||
pname = "nix-cache-tests";
|
pname = "nix-cache-tests";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue