From 2fe87635b523b577f586f1d25955d3bc87f7e2ec Mon Sep 17 00:00:00 2001 From: Johannes Arnold Date: Thu, 2 Sep 2021 23:53:45 +0200 Subject: [PATCH] python3Packages.file_read_backwards: init at 2.0.0 --- pkgs/applications/misc/octoprint/plugins.nix | 5 ++++- .../file-read-backwards/default.nix | 22 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/file-read-backwards/default.nix diff --git a/pkgs/applications/misc/octoprint/plugins.nix b/pkgs/applications/misc/octoprint/plugins.nix index db84d691d510..ae82d4023247 100644 --- a/pkgs/applications/misc/octoprint/plugins.nix +++ b/pkgs/applications/misc/octoprint/plugins.nix @@ -431,7 +431,10 @@ in sha256 = "13q20g7brabplc198jh67lk65rn140r8217iak9b2jy3in8fggv4"; }; - propagatedBuildInputs = with super; [ awesome-slugify setuptools pillow sarge six psutil file_read_backwards ]; + # Test fails due to code executed on import, see #136513 + #pythonImportsCheck = [ "octoprint_octolapse" ]; + + propagatedBuildInputs = with super; [ awesome-slugify setuptools pillow sarge six psutil file-read-backwards ]; meta = with lib; { description = "Stabilized timelapses for Octoprint"; diff --git a/pkgs/development/python-modules/file-read-backwards/default.nix b/pkgs/development/python-modules/file-read-backwards/default.nix new file mode 100644 index 000000000000..80150a60de91 --- /dev/null +++ b/pkgs/development/python-modules/file-read-backwards/default.nix @@ -0,0 +1,22 @@ +{ lib, buildPythonPackage, fetchPypi, mock }: + +buildPythonPackage rec { + pname = "file-read-backwards"; + version = "2.0.0"; + + src = fetchPypi { + pname = "file_read_backwards"; + inherit version; + sha256 = "fd50d9089b412147ea3c6027e2ad905f977002db2918cf315d64eed23d6d6eb8"; + }; + + checkInputs = [ mock ]; + pythonImportsCheck = [ "file_read_backwards" ]; + + meta = with lib; { + homepage = "https://github.com/RobinNil/file_read_backwards"; + description = "Memory efficient way of reading files line-by-line from the end of file"; + license = licenses.mit; + maintainers = with maintainers; [ j0hax ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fc4e04501250..1cb3baeaf347 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2796,6 +2796,8 @@ in { fields = callPackage ../development/python-modules/fields { }; + file-read-backwards = callPackage ../development/python-modules/file-read-backwards { }; + filebrowser_safe = callPackage ../development/python-modules/filebrowser_safe { }; filebytes = callPackage ../development/python-modules/filebytes { };