graphql-engine/nix/versions.nix
rikinsk 8a61802ca0 Merge branch 'main' into stable
GitOrigin-RevId: 3f6efeda389647b2fd7817b15e2952f3a562dbd5
2023-06-08 14:06:50 +00:00

17 lines
450 B
Nix

{ pkgs }:
let
versions = pkgs.lib.trivial.importJSON ../server/VERSIONS.json;
in
{
ensureVersion = package:
let expected = versions.${package.pname};
in
if expected == package.version
then package
else throw "Invalid version for package ${package.pname}: expected ${expected}, got ${package.version}";
ghcVersion = pkgs.lib.strings.fileContents ../.ghcversion;
nodejsVersion = pkgs.lib.strings.fileContents ../.nvmrc;
}