diff options
| author | 2025-12-09 22:51:16 +0100 | |
|---|---|---|
| committer | 2025-12-09 22:51:16 +0100 | |
| commit | a2e191cf0b898ca7ff170f5ff66301bf2935e6fc (patch) | |
| tree | 254a564bcd4cee890551ff3c4c01908d6ee5a8b7 /pkgs | |
| parent | user-config: make import path take precedence (diff) | |
| signature | ||
try to deflakify it (broken commit)
Diffstat (limited to 'pkgs')
| -rw-r--r-- | pkgs/default.nix | 11 | ||||
| -rw-r--r-- | pkgs/pywikibot-scripts/default.nix | 40 | ||||
| -rw-r--r-- | pkgs/shell/default.nix | 29 |
3 files changed, 80 insertions, 0 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix new file mode 100644 index 0000000..fc1a96c --- /dev/null +++ b/pkgs/default.nix @@ -0,0 +1,11 @@ +{ lib, newScope }: + +lib.makeScope newScope (self: { + + /*example = self.callPackage ./example { };*/ + + pywikibot-scripts = self.callPackage ./pywikibot-scripts { }; + + shell = self.callPackage ./shell { pywikibot-scripts = self.pywikibot-scripts; }; + +}) diff --git a/pkgs/pywikibot-scripts/default.nix b/pkgs/pywikibot-scripts/default.nix new file mode 100644 index 0000000..d5ea238 --- /dev/null +++ b/pkgs/pywikibot-scripts/default.nix @@ -0,0 +1,40 @@ +{ + lib, + fetchgit, + python3Packages, +}: + +python3Packages.buildPythonPackage rec { + pname = "pywikibot-scripts"; + version = "10.7.0"; + format = "pyproject"; + + disabled = python3Packages.pythonOlder "3.8"; + + src = fetchgit { + url = "https://gerrit.wikimedia.org/r/pywikibot/core"; + rev = "f1b4b4d0cfbc199c36fb72570425328daa93b067"; + sparseCheckout = [ "pywikibot/scripts" "scripts" ]; + fetchSubmodules = true; + hash = "sha256-MXwrn3WLWmddZRKNryELDRlKmqCqj/6WGDJJbnRAiZs="; + }; + + propagatedBuildInputs = [ + python3Packages.mwparserfromhell + python3Packages.requests + python3Packages.setuptools + ]; + + # Tests attempt to install a tool using pip, which fails due to the sandbox + doCheck = false; + + pythonImportsCheck = [ "pywikibot.scripts" ]; + + meta = { + description = "Python MediaWiki bot framework scripts"; + homepage = "https://www.mediawiki.org/wiki/Manual:Pywikibot"; + changelog = "https://doc.wikimedia.org/pywikibot/master/changelog.html"; + license = lib.licenses.mit; + #maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/shell/default.nix b/pkgs/shell/default.nix new file mode 100644 index 0000000..9dfba08 --- /dev/null +++ b/pkgs/shell/default.nix @@ -0,0 +1,29 @@ +{ mkShellNoCC +, python3 +, python3Packages +, websocat +, jq +, libfaketime +, fossil +, git +, internetarchive +, pywikibot-scripts +}: + +mkShellNoCC { + packages = [ + (python3.withPackages (p: [ + p.requests + p.lxml + p.pywikibot + pywikibot-scripts + ])) + python3Packages.pywikibot + pywikibot-scripts + websocat # connect to websocket + jq + libfaketime # used by my fossil script + fossil git # scms + internetarchive # ia cmdline tool + ]; +} |
