From 3a9977f9ac7d93673bb9bdd8578a6f72ea3a97b6 Mon Sep 17 00:00:00 2001 From: MithicSpirit Date: Sun, 22 Sep 2024 22:19:27 -0400 Subject: [PATCH 1/4] maintainers: add mithicspirit --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index a0fc80df934d..10b37c0f0105 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -13731,6 +13731,12 @@ githubId = 4587373; name = "Mitchell Nordine"; }; + mithicspirit = { + email = "rpc01234@gmail.com"; + github = "MithicSpirit"; + githubId = 24192522; + name = "MithicSpirit"; + }; mjanczyk = { email = "m@dragonvr.pl"; github = "mjanczyk"; From f11759d46f187f89c046dc478fccc04782071e83 Mon Sep 17 00:00:00 2001 From: MithicSpirit Date: Sun, 22 Sep 2024 22:27:27 -0400 Subject: [PATCH 2/4] autotrash: include manpage --- .../python-modules/autotrash/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/autotrash/default.nix b/pkgs/development/python-modules/autotrash/default.nix index 6c628b392535..7bcf1f9272e9 100644 --- a/pkgs/development/python-modules/autotrash/default.nix +++ b/pkgs/development/python-modules/autotrash/default.nix @@ -3,6 +3,8 @@ buildPythonPackage, fetchFromGitHub, poetry-core, + pandoc, + installShellFiles, pytestCheckHook, }: @@ -20,6 +22,13 @@ buildPythonPackage rec { build-system = [ poetry-core ]; + nativeBuildInputs = [ + installShellFiles + pandoc + ]; + postBuild = "make -C doc autotrash.1"; + postInstall = "installManPage doc/autotrash.1"; + pythonImportsCheck = [ "autotrash" ]; nativeCheckInputs = [ pytestCheckHook ]; @@ -27,7 +36,10 @@ buildPythonPackage rec { description = "Tool to automatically purge old trashed files"; license = lib.licenses.gpl3Plus; homepage = "https://bneijt.nl/pr/autotrash"; - maintainers = with lib.maintainers; [ sigmanificient ]; + maintainers = with lib.maintainers; [ + sigmanificient + mithicspirit + ]; mainProgram = "autotrash"; }; } From 5afc0a2d7d6b56a1c854043c15789c44ec9a7306 Mon Sep 17 00:00:00 2001 From: MithicSpirit Date: Mon, 23 Sep 2024 09:40:45 -0400 Subject: [PATCH 3/4] autotrash: move to pkgs/by-name --- .../default.nix => by-name/au/autotrash/package.nix} | 11 ++++------- pkgs/top-level/python-packages.nix | 2 -- 2 files changed, 4 insertions(+), 9 deletions(-) rename pkgs/{development/python-modules/autotrash/default.nix => by-name/au/autotrash/package.nix} (82%) diff --git a/pkgs/development/python-modules/autotrash/default.nix b/pkgs/by-name/au/autotrash/package.nix similarity index 82% rename from pkgs/development/python-modules/autotrash/default.nix rename to pkgs/by-name/au/autotrash/package.nix index 7bcf1f9272e9..c963703a9514 100644 --- a/pkgs/development/python-modules/autotrash/default.nix +++ b/pkgs/by-name/au/autotrash/package.nix @@ -1,14 +1,11 @@ { lib, - buildPythonPackage, + python3Packages, fetchFromGitHub, - poetry-core, pandoc, installShellFiles, - pytestCheckHook, }: - -buildPythonPackage rec { +python3Packages.buildPythonPackage rec { pname = "autotrash"; version = "0.4.7"; pyproject = true; @@ -20,7 +17,7 @@ buildPythonPackage rec { hash = "sha256-qMU3jjBL5+fd9vKX5BIqES5AM8D/54aBOmdHFiBtfEo="; }; - build-system = [ poetry-core ]; + build-system = [ python3Packages.poetry-core ]; nativeBuildInputs = [ installShellFiles @@ -30,7 +27,7 @@ buildPythonPackage rec { postInstall = "installManPage doc/autotrash.1"; pythonImportsCheck = [ "autotrash" ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ python3Packages.pytestCheckHook ]; meta = { description = "Tool to automatically purge old trashed files"; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9d0c8f1966ac..84de40685b78 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1035,8 +1035,6 @@ self: super: with self; { autoslot = callPackage ../development/python-modules/autoslot { }; - autotrash = callPackage ../development/python-modules/autotrash { }; - avahi = toPythonModule (pkgs.avahi.override { inherit python; withPython = true; From 5da1088fcec3cac9ccd84062ae36147a1487500f Mon Sep 17 00:00:00 2001 From: MithicSpirit Date: Mon, 23 Sep 2024 11:22:11 -0400 Subject: [PATCH 4/4] autotrash: add to python-aliases It was moved out of python packages last commit, but this preserves backwards compatibility. --- pkgs/top-level/python-aliases.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 73ca96638605..683090c48c68 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -60,6 +60,7 @@ mapAliases ({ asyncio-mqtt = throw "asyncio-mqtt has been replaced by aiomqtt, which is not API compatible."; # added 2024-07-07 asyncio-nats-client = nats-py; # added 2022-02-08 atsim_potentials = atsim-potentials; # added 2023-10-08 + inherit (super.pkgs) autotrash; # added 2024-09-23 awkward0 = throw "awkward0 has been removed, use awkward instead"; # added 2022-12-13 Babel = babel; # added 2022-05-06 backports_csv = throw "backports_csv has been removed, since we no longer need to backport to python2"; # added 2023-07-28