diff --git a/pkgs/development/python-modules/atom/default.nix b/pkgs/development/python-modules/atom/default.nix index 7db9bda39ee9..88cfc818e3b9 100644 --- a/pkgs/development/python-modules/atom/default.nix +++ b/pkgs/development/python-modules/atom/default.nix @@ -1,19 +1,45 @@ -{ lib, buildPythonPackage, fetchPypi, future, cppy }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools-scm +, future +, cppy +, pytestCheckHook +}: buildPythonPackage rec { pname = "atom"; version = "0.8.0"; + format = "pyproject"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-LnLyNaljNocqAKr85VhIxZqU3KIPAPWnQpazcdoNrXE="; + src = fetchFromGitHub { + owner = "nucleic"; + repo = pname; + rev = version; + hash = "sha256-Xby3QopKw7teShMi80RMG8YdhOOvfQb5vwOuFEUTxHQ="; }; - buildInputs = [ cppy ]; - propagatedBuildInputs = [ future ]; + SETUPTOOLS_SCM_PRETEND_VERSION = version; - # Tests not released to pypi - doCheck = true; + nativeBuildInputs = [ + setuptools-scm + ]; + + buildInputs = [ + cppy + ]; + + preCheck = '' + rm -rf atom + ''; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "atom.api" + ]; meta = with lib; { description = "Memory efficient Python objects";