Commit ce137c95 authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python3Packages.weconnect-mqtt: migrate to finalAttrs

parent 44c58be5
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
  weconnect,
}:

buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
  pname = "weconnect-mqtt";
  version = "0.49.5";
  pyproject = true;
@@ -18,13 +18,13 @@ buildPythonPackage rec {
  src = fetchFromGitHub {
    owner = "tillsteinbach";
    repo = "WeConnect-mqtt";
    tag = "v${version}";
    tag = "v${finalAttrs.version}";
    hash = "sha256-69p7lAO7W+odrm1kLhvB8v4kNKx6IWBUSOQKgrxVCCY=";
  };

  postPatch = ''
    substituteInPlace weconnect_mqtt/__version.py \
      --replace-fail "0.0.0dev" "${version}"
      --replace-fail "0.0.0dev" "${finalAttrs.version}"
    substituteInPlace requirements.txt \
      --replace-fail "weconnect[Images]~=" "weconnect>="
    substituteInPlace pytest.ini \
@@ -52,9 +52,9 @@ buildPythonPackage rec {
  meta = {
    description = "Python client that publishes data from Volkswagen WeConnect";
    homepage = "https://github.com/tillsteinbach/WeConnect-mqtt";
    changelog = "https://github.com/tillsteinbach/WeConnect-mqtt/releases/tag/${src.tag}";
    changelog = "https://github.com/tillsteinbach/WeConnect-mqtt/releases/tag/v${finalAttrs.src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
    mainProgram = "weconnect-mqtt";
  };
}
})