diff --git a/flake.nix b/flake.nix index be11a0f..07827cd 100644 --- a/flake.nix +++ b/flake.nix @@ -60,6 +60,31 @@ }) // { format = treefmt.config.build.check self; + fetcher-assert-npm = + let + # force download debian for consistent hash across systems + binaryTargetBySystem = { + x86_64-linux = "debian"; + aarch64-linux = "debian"; + x86_64-darwin = "debian"; + aarch64-darwin = "debian"; + }; + prisma-legacy = prisma-factory { + inherit pkgs binaryTargetBySystem; + hash = "sha256-R9PG286KQTbzF0r/PPcShUkMiYam2prRh/JICjmhCZA="; + }; + prisma-new = + lockName: lockFile: + prisma-factory { + inherit pkgs binaryTargetBySystem; + hash = "sha256-R9PG286KQTbzF0r/PPcShUkMiYam2prRh/JICjmhCZA="; + ${lockName} = lockFile; + }; + in + assert + (prisma-legacy.fromNpmLock ./npm/package-lock.json).env + == (prisma-new "npmLock" ./npm/package-lock.json).env; + pkgs.hello; }; packages.default = (prisma-factory {