summaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
authorGravatar klea2025-12-09 22:51:16 +0100
committerGravatar klea2025-12-09 22:51:16 +0100
commita2e191cf0b898ca7ff170f5ff66301bf2935e6fc (patch)
tree254a564bcd4cee890551ff3c4c01908d6ee5a8b7 /pkgs
parentuser-config: make import path take precedence (diff)
signature
try to deflakify it (broken commit)
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/default.nix11
-rw-r--r--pkgs/pywikibot-scripts/default.nix40
-rw-r--r--pkgs/shell/default.nix29
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
+ ];
+}