Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions pkgs/by-name/pt/pter/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
lib,
stdenv,
fetchFromGitea,
python311Packages,
python3Packages,
qt5,
withQt ? false,
}:
let
# Use python311Packages on Darwin due to ncurses being disabled in newer versions
pythonPkgs = if stdenv.isDarwin then python311Packages else python3Packages;
in
pythonPkgs.buildPythonApplication rec {
pname = "pter";
version = "3.20.1";
pyproject = true;

src = fetchFromGitea {
domain = "codeberg.org";
owner = "vonshednob";
repo = "pter";
tag = "v${version}";
hash = "sha256-1TJ3MembAMB3sewlZE0G8vI8HFrSjEIdIKq5J51P40g=";
};

build-system = with pythonPkgs; [
docutils
setuptools
];

nativeBuildInputs = lib.optionals withQt [ qt5.wrapQtAppsHook ];

dependencies =
with pythonPkgs;
[
cursedspace
pytodotxt
]
++ lib.optionals withQt [ pyqt5 ];

nativeCheckInputs = [ pythonPkgs.unittestCheckHook ];

unittestFlagsArray = [
"-s"
"tests"
];

dontWrapQtApps = true;

preFixup = lib.optionalString withQt ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';

meta = {
description = "Manage your todo.txt in a commandline user interface";
homepage = "https://vonshednob.cc/pter/";
license = lib.licenses.mit;
mainProgram = if withQt then "qpter" else "pter";
maintainers = [ lib.maintainers.amadejkastelic ];
};
}
46 changes: 46 additions & 0 deletions pkgs/development/python-modules/cursedspace/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
lib,
buildPythonPackage,
fetchFromGitea,
docutils,
setuptools,
unittestCheckHook,
}:

buildPythonPackage rec {
pname = "cursedspace";
version = "1.5.2";
pyproject = true;

src = fetchFromGitea {
domain = "codeberg.org";
owner = "vonshednob";
repo = "cursedspace";
tag = "v${version}";
hash = "sha256-aqjVdjijfrmjeNsjHyYuWIbX9v65bGbQMcK0NahYKpc=";
};

build-system = [
docutils
setuptools
];

nativeCheckInputs = [
unittestCheckHook
];

unittestFlagsArray = [
"-s"
"tests"
];

pythonImportsCheck = [ "cursedspace" ];

meta = {
description = "Python library/framework for TUI application on the basis of the curses package";
homepage = "https://vonshednob.cc/cursedspace/";
changelog = "https://codeberg.org/vonshednob/cursedspace/src/branch/main/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.amadejkastelic ];
};
}
42 changes: 42 additions & 0 deletions pkgs/development/python-modules/pytodotxt/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
lib,
buildPythonPackage,
fetchFromGitea,
setuptools,
unittestCheckHook,
}:

buildPythonPackage rec {
pname = "pytodotxt";
version = "3.0.0";
pyproject = true;

src = fetchFromGitea {
domain = "codeberg.org";
owner = "vonshednob";
repo = "pytodotxt";
tag = "v${version}";
hash = "sha256-f85PgMIMoR/HPPqTdwjymF1mE19pWaPMtSJNQ8UfvP0=";
};

build-system = [ setuptools ];

nativeCheckInputs = [
unittestCheckHook
];

unittestFlagsArray = [
"-s"
"tests"
];

pythonImportsCheck = [ "pytodotxt" ];

meta = {
description = "Python library to access todo.txt-like task lists";
homepage = "https://vonshednob.cc/pytodotxt/";
changelog = "https://codeberg.org/vonshednob/pytodotxt/src/branch/main/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.amadejkastelic ];
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3108,6 +3108,8 @@ self: super: with self; {

curlify = callPackage ../development/python-modules/curlify { };

cursedspace = callPackage ../development/python-modules/cursedspace { };

curtsies = callPackage ../development/python-modules/curtsies { };

curvefitgui = callPackage ../development/python-modules/curvefitgui { };
Expand Down Expand Up @@ -14717,6 +14719,8 @@ self: super: with self; {

pytmx = callPackage ../development/python-modules/pytmx { };

pytodotxt = callPackage ../development/python-modules/pytodotxt { };

pytomlpp = callPackage ../development/python-modules/pytomlpp { };

pytomorrowio = callPackage ../development/python-modules/pytomorrowio { };
Expand Down