gams: move assert behind meta.license check

This now errors with the "allow unfree" error first - and only when
that's passed it asserts the specific `licenseFile` option.

This ensures that CI will not produce an eval warning for the assert
once we turn that on.
This commit is contained in:
Wolfgang Walther 2025-07-18 21:12:51 +02:00
parent 9255558c37
commit 136dcc5f93
No known key found for this signature in database
GPG Key ID: B39893FA5F65CAE1

View File

@ -8,8 +8,6 @@
optgamsFile ? null,
}:
assert licenseFile != null;
stdenv.mkDerivation rec {
version = "25.0.2";
pname = "gams";
@ -23,6 +21,7 @@ stdenv.mkDerivation rec {
dontBuild = true;
installPhase =
assert licenseFile != null;
''
mkdir -p "$out/bin" "$out/share/gams"
cp -a * "$out/share/gams"