diff options
author | makefu <github@syntax-fehler.de> | 2017-05-09 23:17:30 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2017-05-09 23:17:30 +0200 |
commit | fb1fff243a100757391552f7caa691bd9fe36097 (patch) | |
tree | 48d87558a609b9f45d43a37aa27bb04293b32689 /krebs/5pkgs | |
parent | 991687f7428440356403b6c63d695397b33078a6 (diff) | |
parent | 689399546d38b6dc5a643cc2efad9c1d0ae76058 (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'krebs/5pkgs')
-rw-r--r-- | krebs/5pkgs/goify/default.nix | 15 | ||||
-rw-r--r-- | krebs/5pkgs/haskell-overrides/kirk.nix | 18 | ||||
-rw-r--r-- | krebs/5pkgs/haskell-overrides/news.nix | 18 | ||||
-rw-r--r-- | krebs/5pkgs/netcup/default.nix | 32 |
4 files changed, 76 insertions, 7 deletions
diff --git a/krebs/5pkgs/goify/default.nix b/krebs/5pkgs/goify/default.nix index e2849b5c7..9c44aaeeb 100644 --- a/krebs/5pkgs/goify/default.nix +++ b/krebs/5pkgs/goify/default.nix @@ -1,17 +1,18 @@ { pkgs, ... }: -pkgs.writeDashBin "goify" '' +pkgs.writeBashBin "goify" '' set -euf GO_HOST=''${GO_HOST:-go} while read line; do - echo "$line" | sed -E 's|https?://\S*|\n&\n|g' | while read word; do - if echo "$word" | grep -Eq ^https?:; then - ${pkgs.curl}/bin/curl -Ss -F uri="$word" http://"$GO_HOST" | tr -d '\r' + echo "$line" | sed 's|https\?://\S*|\n&\n|g' | while read word; do + if echo "$word" | grep -q '^https\?:'; then + ${pkgs.curl}/bin/curl -Ss -F uri="$word" http://"$GO_HOST" \ + | tr -d '\r' else - echo "$word"; - fi; - done | sed '/^$/d' | tr '\n' ' '; echo; + echo "$word" + fi + done | grep . | tr '\n' ' '; echo done '' diff --git a/krebs/5pkgs/haskell-overrides/kirk.nix b/krebs/5pkgs/haskell-overrides/kirk.nix new file mode 100644 index 000000000..2cd6bb134 --- /dev/null +++ b/krebs/5pkgs/haskell-overrides/kirk.nix @@ -0,0 +1,18 @@ +{ mkDerivation, async, base, bytestring, fetchgit, network +, optparse-applicative, stdenv, text +}: +mkDerivation { + pname = "kirk"; + version = "1.0.0"; + src = fetchgit { + url = "http://cgit.krebsco.de/kirk"; + sha256 = "0w4drg2lyyw45abfn3g55zd6m7pl7yqxql5rpyy6qqdbvnyak94w"; + rev = "c78f3c62c0ba76465e39d1570073f867aa2d4240"; + }; + isLibrary = false; + isExecutable = true; + executableHaskellDepends = [ + async base bytestring network optparse-applicative text + ]; + license = stdenv.lib.licenses.mit; +} diff --git a/krebs/5pkgs/haskell-overrides/news.nix b/krebs/5pkgs/haskell-overrides/news.nix new file mode 100644 index 000000000..ba5e7a5e1 --- /dev/null +++ b/krebs/5pkgs/haskell-overrides/news.nix @@ -0,0 +1,18 @@ +{ mkDerivation, base, bloomfilter, bytestring, feed, fetchgit, lens +, stdenv, wreq +}: +mkDerivation { + pname = "news"; + version = "1.0.0"; + src = fetchgit { + url = "http://cgit.lassul.us/news"; + sha256 = "1n3ffr2a5irr5aly0y7qsafag3kxvyyh077ayk0vdwbd0s9hvnjs"; + rev = "c3eb2c0a1a34fc41e18d0bc99b1c4dc73aa6eb20"; + }; + isLibrary = false; + isExecutable = true; + executableHaskellDepends = [ + base bloomfilter bytestring feed lens wreq + ]; + license = stdenv.lib.licenses.mit; +} diff --git a/krebs/5pkgs/netcup/default.nix b/krebs/5pkgs/netcup/default.nix new file mode 100644 index 000000000..d1f46299d --- /dev/null +++ b/krebs/5pkgs/netcup/default.nix @@ -0,0 +1,32 @@ +{ coreutils, curl, fetchgit, gawk, gnugrep, gnused, jq, stdenv, w3m, ... }: +with import <stockholm/lib>; +let + readJSON = path: fromJSON (readFile path); + sed.escape = replaceChars ["/"] ["\\/"]; # close enough + PATH = makeBinPath [ + coreutils + curl + gawk + gnugrep + gnused + jq + w3m + ]; +in +stdenv.mkDerivation { + name = "netcup-1.0.0"; + src = fetchgit { + url = "http://cgit.ni.krebsco.de/netcup"; + rev = "refs/tags/v1.0.0"; + sha256 = "1rn7bncfhjw0bqjbvj38m7lks4nyf5qcvkj9dg0zr99ba6dylzx5"; + }; + phases = [ "unpackPhase" "patchPhase" "installPhase" ]; + patchPhase = '' + path=${shell.escape (sed.escape PATH)} + sed -i "1s/.*/&\nPATH=$path/" vcp + ''; + installPhase = '' + mkdir -p $out/bin + cp vcp $out/bin + ''; +} |