From b1d7b0173259c39efe189e40e128399486915bd7 Mon Sep 17 00:00:00 2001 From: Leah Amelia Chen Date: Tue, 10 Dec 2024 11:12:20 +0100 Subject: [PATCH] dput-ng: init at 1.40 --- pkgs/by-name/dp/dput-ng/package.nix | 59 +++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 pkgs/by-name/dp/dput-ng/package.nix diff --git a/pkgs/by-name/dp/dput-ng/package.nix b/pkgs/by-name/dp/dput-ng/package.nix new file mode 100644 index 000000000000..bdeddc292643 --- /dev/null +++ b/pkgs/by-name/dp/dput-ng/package.nix @@ -0,0 +1,59 @@ +{ + lib, + python3, + fetchFromGitLab, + nix-update-script, +}: +let + version = "1.40"; +in +python3.pkgs.buildPythonApplication { + pname = "dput-ng"; + inherit version; + pyproject = true; + + src = fetchFromGitLab { + domain = "salsa.debian.org"; + owner = "debian"; + repo = "dput-ng"; + rev = "refs/tags/${version}"; + hash = "sha256-97NrRUmIjrP41NyI4KOEzHLlaqxehZIhSVyx9hRZ0dw="; + }; + + build-system = with python3.pkgs; [ + setuptools + ]; + + dependencies = with python3.pkgs; [ + jsonschema + paramiko + sphinx + coverage + xdg + debian + ]; + + postInstall = '' + cp -r bin $out/ + ''; + + pythonImportsCheck = [ "dput" ]; + + nativeCheckInputs = with python3.pkgs; [ + pytestCheckHook + ]; + + # Requires running dpkg + disabledTestPaths = [ "tests/test_upload.py" ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Next-generation Debian package upload tool"; + homepage = "https://dput.readthedocs.io/en/latest/"; + license = with lib.licenses; [ gpl2Plus ]; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ pluiedev ]; + mainProgram = "dput"; + }; +}