openttd-nml: embed and check version

This commit is contained in:
Stefan Frijters
2026-01-24 23:28:11 +01:00
parent 8a5068a9f2
commit a149d692e9
+9
View File
@@ -2,6 +2,7 @@
lib,
fetchFromGitHub,
python3,
versionCheckHook,
}:
python3.pkgs.buildPythonApplication (finalAttrs: {
@@ -16,10 +17,18 @@ python3.pkgs.buildPythonApplication (finalAttrs: {
hash = "sha256-swAkUhduIhcfbAvKsPaJNBXcv8T6GDaxk3KKLLa9GQ8=";
};
postPatch = ''
echo 'version = "${finalAttrs.version}"' > nml/__version__.py
'';
propagatedBuildInputs = with python3.pkgs; [
pillow
];
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
meta = {
homepage = "http://openttdcoop.org/";
description = "Compiler for OpenTTD NML files";