From 3d8dd6bbd9b7f8bcb9f5e015a13a2a3773c1d4ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 8 Feb 2022 17:59:36 +0100 Subject: [PATCH] python39Packages.adguardhome: fix version number --- .../python-modules/adguardhome/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/adguardhome/default.nix b/pkgs/development/python-modules/adguardhome/default.nix index 8521aa91d7ce..134132f9931e 100644 --- a/pkgs/development/python-modules/adguardhome/default.nix +++ b/pkgs/development/python-modules/adguardhome/default.nix @@ -23,6 +23,15 @@ buildPythonPackage rec { sha256 = "sha256-HAgt52Bo2NOUkpr5xvWTcRyrLKpfcBDlVAZxgDNI7hY="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "--cov" "" \ + --replace '"0.0.0"' '"${version}"' + + substituteInPlace tests/test_adguardhome.py \ + --replace 0.0.0 ${version} + ''; + nativeBuildInputs = [ poetry-core ]; propagatedBuildInputs = [ @@ -36,10 +45,6 @@ buildPythonPackage rec { pytestCheckHook ]; - postPatch = '' - substituteInPlace pyproject.toml --replace "--cov" "" - ''; - pythonImportsCheck = [ "adguardhome" ]; meta = with lib; {