|
| 1 | +{ |
| 2 | + perSystem = |
| 3 | + { pkgs, ... }: |
| 4 | + let |
| 5 | + prisma-factory = import ../prisma.nix; |
| 6 | + yarn-v1 = pkgs.writeShellApplication { |
| 7 | + name = "yarn-v1"; |
| 8 | + checkPhase = ""; |
| 9 | + runtimeInputs = [ pkgs.yarn ]; |
| 10 | + text = "yarn $@"; |
| 11 | + }; |
| 12 | + yarn-berry = pkgs.writeShellApplication { |
| 13 | + name = "yarn-berry"; |
| 14 | + checkPhase = ""; |
| 15 | + runtimeInputs = [ pkgs.yarn-berry ]; |
| 16 | + text = "yarn $@"; |
| 17 | + }; |
| 18 | + in |
| 19 | + { |
| 20 | + checks = |
| 21 | + (pkgs.callPackages ../tests.nix { |
| 22 | + fetcherMode = "new"; |
| 23 | + inherit |
| 24 | + pkgs |
| 25 | + prisma-factory |
| 26 | + yarn-v1 |
| 27 | + yarn-berry |
| 28 | + ; |
| 29 | + }) |
| 30 | + // (pkgs.callPackages ../tests.nix { |
| 31 | + fetcherMode = "legacy"; |
| 32 | + inherit |
| 33 | + pkgs |
| 34 | + prisma-factory |
| 35 | + yarn-v1 |
| 36 | + yarn-berry |
| 37 | + ; |
| 38 | + }) |
| 39 | + // { |
| 40 | + fetcher-assert-npm = |
| 41 | + let |
| 42 | + # force download debian for consistent hash across systems |
| 43 | + binaryTargetBySystem = { |
| 44 | + x86_64-linux = "debian"; |
| 45 | + aarch64-linux = "debian"; |
| 46 | + x86_64-darwin = "debian"; |
| 47 | + aarch64-darwin = "debian"; |
| 48 | + }; |
| 49 | + prisma-legacy = prisma-factory { |
| 50 | + inherit pkgs binaryTargetBySystem; |
| 51 | + hash = "sha256-R9PG286KQTbzF0r/PPcShUkMiYam2prRh/JICjmhCZA="; |
| 52 | + }; |
| 53 | + prisma-new = |
| 54 | + lockName: lockFile: |
| 55 | + prisma-factory { |
| 56 | + inherit pkgs binaryTargetBySystem; |
| 57 | + hash = "sha256-R9PG286KQTbzF0r/PPcShUkMiYam2prRh/JICjmhCZA="; |
| 58 | + ${lockName} = lockFile; |
| 59 | + }; |
| 60 | + in |
| 61 | + assert |
| 62 | + (prisma-legacy.fromNpmLock ../npm/package-lock.json).env |
| 63 | + == (prisma-new "npmLock" ../npm/package-lock.json).env; |
| 64 | + pkgs.hello; |
| 65 | + prisma-next = |
| 66 | + (prisma-factory { |
| 67 | + pkgs = pkgs; |
| 68 | + versionString = "6.20.0-16.next-0c19ccc313cf9911a90d99d2ac2eb0280c76c513"; |
| 69 | + hash = |
| 70 | + { |
| 71 | + x86_64-linux = "sha256-JWX+N/mmp9uJLcv4XFbQ3yg34fFf2BLIUpOLrrfTjEM="; |
| 72 | + x86_64-darwin = "sha256-WNwFOoeDOebbfAh4y/NvZCyE9otaJdg2hHb4ifEFD+Y="; |
| 73 | + aarch64-linux = "sha256-f9FuPZaGx0FwKo4pA9f8g82MTcAzYLwWslxjb7oqk6E="; |
| 74 | + aarch64-darwin = "sha256-NMI+JcP3epBO3V37D19TDgzivMnPekgrYqUrXB6qNV0="; |
| 75 | + } |
| 76 | + .${pkgs.system}; |
| 77 | + }).package; |
| 78 | + }; |
| 79 | + }; |
| 80 | +} |
0 commit comments