openttd-nml: embed and check version
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user