summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/Reaktor
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2018-09-25 19:56:06 +0200
committerjeschli <jeschli@gmail.com>2018-09-25 19:56:06 +0200
commit8834d1a9ff6eddfc36e3ad07b7f93805b3212b3f (patch)
tree9ce300976ec88d90e5c5c9030111d890dcf5683e /krebs/5pkgs/simple/Reaktor
parentf922d5947acc3151619ec06962197a800d3138eb (diff)
parenta374a452112ba962ab90e45b6b0f27b3a1330e4f (diff)
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'krebs/5pkgs/simple/Reaktor')
-rw-r--r--krebs/5pkgs/simple/Reaktor/default.nix12
-rw-r--r--krebs/5pkgs/simple/Reaktor/plugins.nix2
-rw-r--r--krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py12
3 files changed, 19 insertions, 7 deletions
diff --git a/krebs/5pkgs/simple/Reaktor/default.nix b/krebs/5pkgs/simple/Reaktor/default.nix
index 6989bb02b..a9566087f 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/;
diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix
index 92a270ef3..6f59ad1de 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 = "^.*(?P<args>http[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 = with pkgs.python3Packages; [ beautifulsoup4 lxml ]; } ''
import cgi
import sys
import urllib.request
diff --git a/krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py b/krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py
index 51ac7a071..ecb03917b 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']