diff options
author | makefu <github@syntax-fehler.de> | 2022-04-27 22:07:43 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2022-04-27 22:07:43 +0200 |
commit | bdd36774f5e0854553b13433ef85260c6c074b3e (patch) | |
tree | 656d0a2755c098a9e69c373a8c4f39fa82cb8d1e /krebs/5pkgs | |
parent | c3adb252afa29f0140f29c935201cfbb100b5697 (diff) | |
parent | 92d5eacd6d9e530c4d1ea0dec2652417b0fde78a (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'krebs/5pkgs')
-rw-r--r-- | krebs/5pkgs/haskell/hack.nix | 6 | ||||
-rw-r--r-- | krebs/5pkgs/haskell/pager.nix | 23 | ||||
-rw-r--r-- | krebs/5pkgs/haskell/xmonad-stockholm.nix | 17 | ||||
-rw-r--r-- | krebs/5pkgs/simple/git-hooks/default.nix | 7 | ||||
-rw-r--r-- | krebs/5pkgs/simple/pager.nix | 36 | ||||
-rw-r--r-- | krebs/5pkgs/simple/qrscan.nix | 26 | ||||
-rw-r--r-- | krebs/5pkgs/simple/untilport/default.nix | 2 |
7 files changed, 82 insertions, 35 deletions
diff --git a/krebs/5pkgs/haskell/hack.nix b/krebs/5pkgs/haskell/hack.nix index 37ef94e46..df3343818 100644 --- a/krebs/5pkgs/haskell/hack.nix +++ b/krebs/5pkgs/haskell/hack.nix @@ -3,11 +3,11 @@ }: mkDerivation { pname = "hack"; - version = "1.0.0"; + version = "1.0.1"; src = fetchgit { url = "https://cgit.krebsco.de/hack"; - sha256 = "0hi6frpnxbg3h6s7gd48ri57jc226qycy4rnhmpzpq195xf8y3pf"; - rev = "cb004b2e5f0fce6cea8d54e60558a1c1904dbe39"; + sha256 = "0ry5ikn89ij512qvk1xhdhfz4s8a6b9yawgx6lxgnw5jkiyjd7ka"; + rev = "f3ea150aca5cc86878fa10bc5b1f0918fc154e2a"; fetchSubmodules = true; }; isLibrary = true; diff --git a/krebs/5pkgs/haskell/pager.nix b/krebs/5pkgs/haskell/pager.nix new file mode 100644 index 000000000..3c9f80466 --- /dev/null +++ b/krebs/5pkgs/haskell/pager.nix @@ -0,0 +1,23 @@ +{ mkDerivation, base, blessings, bytestring, containers +, data-default, hack, lib, optparse-applicative, probability +, scanner, speculate, split, terminal-size, text, unix, X11 +, fetchgit +}: +mkDerivation { + pname = "pager"; + version = "1.0.0"; + src = fetchgit { + url = "https://cgit.krebsco.de/pager"; + sha256 = "1kqd27faxinkwpxancyk0xl6n7ljlc8iqhnnq85l76bk4qi9b45i"; + rev = "f4cdf79bd4a75e9eafe68b9a908f4cc68682b7ef"; + fetchSubmodules = true; + }; + isLibrary = false; + isExecutable = true; + executableHaskellDepends = [ + base blessings bytestring containers data-default hack + optparse-applicative probability scanner speculate split + terminal-size text unix X11 + ]; + license = lib.licenses.mit; +} diff --git a/krebs/5pkgs/haskell/xmonad-stockholm.nix b/krebs/5pkgs/haskell/xmonad-stockholm.nix index 751f26749..c43dbe271 100644 --- a/krebs/5pkgs/haskell/xmonad-stockholm.nix +++ b/krebs/5pkgs/haskell/xmonad-stockholm.nix @@ -1,15 +1,18 @@ -{ mkDerivation, base, containers, fetchgit, filepath, lib, unix, X11, X11-xft , X11-xshape, xmonad, xmonad-contrib +{ mkDerivation, base, containers, directory, fetchgit, filepath +, lib, unix, X11, X11-xft, X11-xshape, xmonad, xmonad-contrib }: -mkDerivation rec { +mkDerivation { pname = "xmonad-stockholm"; - version = "1.3.0"; + version = "1.3.1"; src = fetchgit { - url = http://cgit.ni.krebsco.de/xmonad-stockholm; - rev = "refs/tags/v1.3.0"; - sha256 = "1np5126wn67y0a1r60rnkq828s0w9zjnvai4b8zy3yc02xlkrjm9"; + url = "https://cgit.krebsco.de/xmonad-stockholm"; + sha256 = "1m4kkppy143jvjzhy5aawh8q6sglpnqhiajxbdcr42j02ibf3vvq"; + rev = "89bae8aad73db8fe9e11da7d515f0b236e7fea51"; + fetchSubmodules = true; }; libraryHaskellDepends = [ - base containers filepath unix X11 X11-xft X11-xshape xmonad xmonad-contrib + base containers directory filepath unix X11 X11-xft X11-xshape + xmonad xmonad-contrib ]; license = lib.licenses.mit; } diff --git a/krebs/5pkgs/simple/git-hooks/default.nix b/krebs/5pkgs/simple/git-hooks/default.nix index c9dcc7541..3ec43739c 100644 --- a/krebs/5pkgs/simple/git-hooks/default.nix +++ b/krebs/5pkgs/simple/git-hooks/default.nix @@ -96,7 +96,12 @@ with stockholm.lib; #$host $GIT_SSH_REPO $ref $link add_message $(pink push) $link $(gray "($receive_mode)") - ${optionalString verbose /* sh */ '' + ${optionalString (verbose == true || typeOf verbose == "set") /* sh */ '' + ${optionalString (verbose.exclude or [] != []) /* sh */ '' + case $ref in (${concatStringsSep "|" verbose.exclude}) + continue + esac + ''} add_message "$( git log \ --format="$(orange %h) %s $(gray '(%ar)')" \ diff --git a/krebs/5pkgs/simple/pager.nix b/krebs/5pkgs/simple/pager.nix new file mode 100644 index 000000000..ed740490d --- /dev/null +++ b/krebs/5pkgs/simple/pager.nix @@ -0,0 +1,36 @@ +{ pkgs }: + +pkgs.writeDashBin "pager" '' + # usage: pager {view,shift,shiftview} + # + # Environment variables + # + # PAGER_NAME (default: Pager) + # The environment variables specifies the application name under which + # resources are to be obtained. PAGER_NAME should not contain “.” or “*” + # characters. + # + set -efu + + pidfile=$XDG_RUNTIME_DIR/pager.lock + name=''${PAGER_NAME-Pager} + + if test -e "$pidfile" && + ${pkgs.procps}/bin/pgrep --pidfile="$pidfile" >/dev/null + then + ${pkgs.procps}/bin/pkill --pidfile="$pidfile" + ${pkgs.coreutils}/bin/rm "$pidfile" + exit + fi + + echo $$ > "$pidfile" + + exec ${pkgs.xterm}/bin/xterm \ + -name "$name" \ + -ti vt340 \ + -xrm 'Pager*geometry: 32x10' \ + -xrm 'Pager*internalBorder: 2' \ + -xrm 'Pager*background: #050505' \ + -xrm 'Pager*foreground: #d0d7d0' \ + -e ${pkgs.haskellPackages.pager}/bin/pager "$@" +'' diff --git a/krebs/5pkgs/simple/qrscan.nix b/krebs/5pkgs/simple/qrscan.nix index 7d99dcee7..df9a98053 100644 --- a/krebs/5pkgs/simple/qrscan.nix +++ b/krebs/5pkgs/simple/qrscan.nix @@ -1,27 +1,7 @@ -{ coreutils, gnused, writeDashBin, zbar }: +{ pkgs }: -writeDashBin "qrscan" '' +pkgs.writeDashBin "qrscan" '' set -efu - tmpdir=$(${coreutils}/bin/mktemp --tmpdir -d qrscan.XXXXXXXX) - codefile=$tmpdir/code - - cleanup() { - ${coreutils}/bin/rm "$codefile" - ${coreutils}/bin/rmdir "$tmpdir" - } - - ${coreutils}/bin/mkfifo "$codefile" - - ${zbar}/bin/zbarcam > "$codefile" & - zbarcampid=$! - - exec < "$codefile" - while read -r code; do - code=$(printf %s "$code" | ${gnused}/bin/sed -n 's/^QR-Code://p') - if test -n "$code"; then - ${coreutils}/bin/kill "$zbarcampid" - echo "$code" - fi - done + ${pkgs.zbar}/bin/zbarcam -1 | ${pkgs.gnused}/bin/sed -n 's/^QR-Code://p' '' diff --git a/krebs/5pkgs/simple/untilport/default.nix b/krebs/5pkgs/simple/untilport/default.nix index 61bcc2b89..2930fd1eb 100644 --- a/krebs/5pkgs/simple/untilport/default.nix +++ b/krebs/5pkgs/simple/untilport/default.nix @@ -13,6 +13,6 @@ pkgs.writeDashBin "untilport" '' if [ $# -ne 2 ]; then usage else - until ${pkgs.netcat-openbsd}/bin/nc -z "$@"; do sleep 1; done + until ${pkgs.libressl.nc}/bin/nc -z "$@"; do sleep 1; done fi '' |