Merge branch 'tv'
This commit is contained in:
commit
fea580ef0c
@ -15,6 +15,7 @@ rec {
|
|||||||
github-hosts-sync = callPackage ./github-hosts-sync {};
|
github-hosts-sync = callPackage ./github-hosts-sync {};
|
||||||
github-known_hosts = callPackage ./github-known_hosts {};
|
github-known_hosts = callPackage ./github-known_hosts {};
|
||||||
hashPassword = callPackage ./hashPassword {};
|
hashPassword = callPackage ./hashPassword {};
|
||||||
|
jq = callPackage ./jq {};
|
||||||
krebszones = callPackage ./krebszones {};
|
krebszones = callPackage ./krebszones {};
|
||||||
lentil = callPackage ./lentil {};
|
lentil = callPackage ./lentil {};
|
||||||
much = callPackage ./much {};
|
much = callPackage ./much {};
|
||||||
|
33
krebs/5pkgs/jq/default.nix
Normal file
33
krebs/5pkgs/jq/default.nix
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{stdenv, fetchurl}:
|
||||||
|
let
|
||||||
|
s = # Generated upstream information
|
||||||
|
rec {
|
||||||
|
baseName="jq";
|
||||||
|
version="1.5";
|
||||||
|
name="${baseName}-${version}";
|
||||||
|
url=https://github.com/stedolan/jq/releases/download/jq-1.5/jq-1.5.tar.gz;
|
||||||
|
sha256="0g29kyz4ykasdcrb0zmbrp2jqs9kv1wz9swx849i2d1ncknbzln4";
|
||||||
|
};
|
||||||
|
buildInputs = [
|
||||||
|
];
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
inherit (s) name version;
|
||||||
|
inherit buildInputs;
|
||||||
|
src = fetchurl {
|
||||||
|
inherit (s) url sha256;
|
||||||
|
};
|
||||||
|
|
||||||
|
# jq is linked to libjq:
|
||||||
|
configureFlags = [
|
||||||
|
"LDFLAGS=-Wl,-rpath,\\\${libdir}"
|
||||||
|
];
|
||||||
|
meta = {
|
||||||
|
inherit (s) version;
|
||||||
|
description = ''A lightweight and flexible command-line JSON processor'';
|
||||||
|
license = stdenv.lib.licenses.mit ;
|
||||||
|
maintainers = [stdenv.lib.maintainers.raskin];
|
||||||
|
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -64,6 +64,7 @@ let
|
|||||||
nick = config.krebs.build.host.name;
|
nick = config.krebs.build.host.name;
|
||||||
channel = "#retiolum";
|
channel = "#retiolum";
|
||||||
server = "cd.retiolum";
|
server = "cd.retiolum";
|
||||||
|
verbose = config.krebs.build.host.name == "cd";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) addNames escapeShellArg makeSearchPath;
|
inherit (lib) addNames escapeShellArg makeSearchPath optionalString;
|
||||||
|
|
||||||
commands = addNames {
|
commands = addNames {
|
||||||
git-receive-pack = {};
|
git-receive-pack = {};
|
||||||
@ -104,7 +104,7 @@ let
|
|||||||
|
|
||||||
hooks = {
|
hooks = {
|
||||||
# TODO make this a package?
|
# TODO make this a package?
|
||||||
irc-announce = { nick, channel, server, port ? 6667 }: ''
|
irc-announce = { nick, channel, server, port ? 6667, verbose ? false }: ''
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
set -euf
|
set -euf
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ let
|
|||||||
|
|
||||||
h=$(echo $ref | sed 's:^refs/heads/::')
|
h=$(echo $ref | sed 's:^refs/heads/::')
|
||||||
|
|
||||||
# empty_tree=$(git hash-object -t tree /dev/null
|
# empty_tree=$(git hash-object -t tree /dev/null)
|
||||||
empty_tree=4b825dc6
|
empty_tree=4b825dc6
|
||||||
|
|
||||||
id=$(echo $newrev | cut -b-7)
|
id=$(echo $newrev | cut -b-7)
|
||||||
@ -160,11 +160,9 @@ let
|
|||||||
|
|
||||||
case $receive_mode in
|
case $receive_mode in
|
||||||
create)
|
create)
|
||||||
#git log --oneline $id2
|
|
||||||
link="$cgit_endpoint/$GIT_SSH_REPO/?h=$h"
|
link="$cgit_endpoint/$GIT_SSH_REPO/?h=$h"
|
||||||
;;
|
;;
|
||||||
delete)
|
delete)
|
||||||
#git log --oneline $id2
|
|
||||||
link="$cgit_endpoint/$GIT_SSH_REPO/ ($h)"
|
link="$cgit_endpoint/$GIT_SSH_REPO/ ($h)"
|
||||||
;;
|
;;
|
||||||
fast-forward|non-fast-forward)
|
fast-forward|non-fast-forward)
|
||||||
@ -175,6 +173,7 @@ let
|
|||||||
#$host $GIT_SSH_REPO $ref $link
|
#$host $GIT_SSH_REPO $ref $link
|
||||||
add_message $(pink push) $link $(gray "($receive_mode)")
|
add_message $(pink push) $link $(gray "($receive_mode)")
|
||||||
|
|
||||||
|
${optionalString verbose ''
|
||||||
add_message "$(
|
add_message "$(
|
||||||
git log \
|
git log \
|
||||||
--format="$(orange %h) %s $(gray '(%ar)')" \
|
--format="$(orange %h) %s $(gray '(%ar)')" \
|
||||||
@ -184,6 +183,7 @@ let
|
|||||||
git diff --stat $id2..$id \
|
git diff --stat $id2..$id \
|
||||||
| sed '$!s/\(+*\)\(-*\)$/'$(green '\1')$(red '\2')'/'
|
| sed '$!s/\(+*\)\(-*\)$/'$(green '\1')$(red '\2')'/'
|
||||||
)"
|
)"
|
||||||
|
''}
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user