Unverified Commit 7208344a authored by Gergő Gutyina's avatar Gergő Gutyina Committed by GitHub
Browse files

openttd-nml: 0.8.0 -> 0.8.1, embed & check version (#483475)

parents 495a7c52 a149d692
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -2,24 +2,33 @@
  lib,
  fetchFromGitHub,
  python3,
  versionCheckHook,
}:

python3.pkgs.buildPythonApplication rec {
python3.pkgs.buildPythonApplication (finalAttrs: {
  pname = "openttd-nml";
  version = "0.8.0";
  version = "0.8.1";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "OpenTTD";
    repo = "nml";
    tag = version;
    hash = "sha256-LZhkyYTtolB9/1ZvwYa+TJJRBIifyuqlMawK7vhPV0k=";
    tag = finalAttrs.version;
    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";
@@ -27,4 +36,4 @@ python3.pkgs.buildPythonApplication rec {
    license = lib.licenses.gpl2Plus;
    maintainers = with lib.maintainers; [ ToxicFrog ];
  };
}
})