From eb0087649d7174763cc790313994f2d9f2f62c19 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 16 Sep 2018 19:46:08 +0200 Subject: Reaktor: 0.5.1 -> 0.6.0 --- krebs/5pkgs/simple/Reaktor/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'krebs/5pkgs/simple/Reaktor') diff --git a/krebs/5pkgs/simple/Reaktor/default.nix b/krebs/5pkgs/simple/Reaktor/default.nix index 6989bb02..a9566087 100644 --- a/krebs/5pkgs/simple/Reaktor/default.nix +++ b/krebs/5pkgs/simple/Reaktor/default.nix @@ -1,8 +1,8 @@ -{ lib, pkgs,python3Packages,fetchurl, ... }: +{ lib, pkgs, python3Packages, fetchFromGitHub, ... }: python3Packages.buildPythonPackage rec { name = "Reaktor-${version}"; - version = "0.5.1"; + version = "0.6.0"; doCheck = false; @@ -10,9 +10,11 @@ python3Packages.buildPythonPackage rec { python3Packages.docopt python3Packages.requests ]; - src = fetchurl { - url = "https://pypi.python.org/packages/source/R/Reaktor/Reaktor-${version}.tar.gz"; - sha256 = "0dn9r0cyxi1sji2pnybsrc4hhaaq7hmf235nlgkrxqlsdb7y6n6n"; + src = fetchFromGitHub { + owner = "krebs"; + repo = "Reaktor"; + rev = version; + sha256 = "0nsnv1rixmlg5wkb74b4f5bycb42b9rp4b14hijh558hbsa1b9am"; }; meta = { homepage = http://krebsco.de/; -- cgit v1.2.3 From 934d8878158e640c8b5b0f5cc9501f6e10eb1260 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 16 Sep 2018 22:19:36 +0200 Subject: reaktor plugins: fix writePython usage --- krebs/5pkgs/simple/Reaktor/plugins.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs/5pkgs/simple/Reaktor') diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index 92a270ef..2ccc1c8e 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -120,7 +120,7 @@ rec { url-title = (buildSimpleReaktorPlugin "url-title" { pattern = "^.*(?Phttp[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+).*$$"; path = with pkgs; [ curl perl ]; - script = pkgs.writePython3 "url-title" [ "beautifulsoup4" "lxml" ] '' + script = pkgs.writePython3 "url-title" { deps = [ "beautifulsoup4" "lxml" ]; } '' import cgi import sys import urllib.request -- cgit v1.2.3 From 6e2a93f9aba19a96038f858132b09607eb2f4619 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 18 Sep 2018 16:13:55 +0200 Subject: Reaktor sed-plugin: add until open shelve file --- krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'krebs/5pkgs/simple/Reaktor') diff --git a/krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py b/krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py index 51ac7a07..ecb03917 100644 --- a/krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py +++ b/krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py @@ -8,9 +8,19 @@ import shelve from os import environ from os.path import join from sys import argv +from time import sleep import re -d = shelve.open(join(environ['state_dir'], 'sed-plugin.shelve'), writeback=True) +# try to open the shelve file until it succeeds +while True: + try: + d = shelve.open( + join(environ['state_dir'], 'sed-plugin.shelve'), + writeback=True + ) + break + except: # noqa: E722 + sleep(0.2) usr = environ['_from'] -- cgit v1.2.3 From 61bddc8d224cf956f1f34cbbefea779bf4c77359 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 18 Sep 2018 22:06:01 +0200 Subject: Reaktor url-title: fix writePython usage --- krebs/5pkgs/simple/Reaktor/plugins.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs/5pkgs/simple/Reaktor') diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index 2ccc1c8e..6f59ad1d 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -120,7 +120,7 @@ rec { url-title = (buildSimpleReaktorPlugin "url-title" { pattern = "^.*(?Phttp[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+).*$$"; path = with pkgs; [ curl perl ]; - script = pkgs.writePython3 "url-title" { deps = [ "beautifulsoup4" "lxml" ]; } '' + script = pkgs.writePython3 "url-title" { deps = with pkgs.python3Packages; [ beautifulsoup4 lxml ]; } '' import cgi import sys import urllib.request -- cgit v1.2.3