Merge remote-tracking branch 'cd/master'

This commit is contained in:
makefu 2015-10-16 23:21:19 +02:00
commit 9da82f7bc6
7 changed files with 65 additions and 22 deletions

View File

@ -35,11 +35,11 @@ ifeq ($(filter),json)
else else
filter() { cat; } filter() { cat; }
endif endif
NIX_PATH=stockholm=$$PWD:$$NIX_PATH \
nix-instantiate \ nix-instantiate \
$${extraArgs-} \ $${extraArgs-} \
--eval \ --eval \
-A "$$get" \ -A "$$get" \
-I stockholm="$$PWD" \
'<stockholm>' \ '<stockholm>' \
--argstr current-date "$$(date -Is)" \ --argstr current-date "$$(date -Is)" \
--argstr current-host-name "$$HOSTNAME" \ --argstr current-host-name "$$HOSTNAME" \

View File

@ -5,6 +5,8 @@ with lib;
builtins // lib // rec { builtins // lib // rec {
eq = x: y: x == y;
addName = name: set: addName = name: set:
set // { inherit name; }; set // { inherit name; };
@ -22,4 +24,8 @@ builtins // lib // rec {
null = "NULL"; null = "NULL";
string = toJSON x; # close enough string = toJSON x; # close enough
}.${typeOf x}; }.${typeOf x};
subdirsOf = path:
mapAttrs (name: _: path + "/${name}")
(filterAttrs (_: eq "directory") (readDir path));
} }

View File

@ -3,28 +3,15 @@
with import ../4lib { inherit lib; }; with import ../4lib { inherit lib; };
let let
inherit (pkgs) callPackage; subdirs = mapAttrs (_: flip pkgs.callPackage {}) (subdirsOf ./.);
pkgs' = pkgs // subdirs;
in in
rec { subdirs // rec {
cac = callPackage ./cac {};
charybdis = callPackage ./charybdis {}; push = pkgs'.callPackage ./push {
dic = callPackage ./dic {}; inherit (subdirs) get jq;
genid = callPackage ./genid {}; };
get = callPackage ./get {};
github-hosts-sync = callPackage ./github-hosts-sync {};
hashPassword = callPackage ./hashPassword {};
jq = callPackage ./jq {};
krebszones = callPackage ./krebszones {};
lentil = callPackage ./lentil {};
much = callPackage ./much {};
nq = callPackage ./nq {};
posix-array = callPackage ./posix-array {};
pssh = callPackage ./pssh {};
passwdqc-utils = callPackage ./passwdqc-utils {};
Reaktor = callPackage ./Reaktor {};
realwallpaper = callPackage ./realwallpaper.nix {};
youtube-tools = callPackage ./youtube-tools {};
execve = name: { filename, argv, envp ? {}, destination ? "" }: execve = name: { filename, argv, envp ? {}, destination ? "" }:
writeC name { inherit destination; } '' writeC name { inherit destination; } ''

View File

@ -0,0 +1,48 @@
{ fetchgit, lib, stdenv
, coreutils
, get
, git
, gnused
, jq
, openssh
, parallel
, ... }:
stdenv.mkDerivation {
name = "push-1.0.0";
src = fetchgit {
url = http://cgit.cd.retiolum/push;
rev = "513da89fe50b3bad3d758855f5622c4508977e4a";
sha256 = "6124e1d4d4ef57455e2f06891e06fb01d3786846efaf9b79e3176d89988e1b4e";
};
phases = [
"unpackPhase"
"installPhase"
];
installPhase =
let
path = lib.makeSearchPath "bin" [
coreutils
get
git
gnused
jq
openssh
parallel
];
in
''
mkdir -p $out/bin
sed \
'1s,.*,&\nPATH=${path},' \
< ./push \
> $out/bin/push
chmod +x $out/bin/push
'';
}

View File

@ -24,7 +24,7 @@ in
krebs.build.source = { krebs.build.source = {
git.nixpkgs = { git.nixpkgs = {
url = https://github.com/NixOS/nixpkgs; url = https://github.com/NixOS/nixpkgs;
rev = "68bd8e4a9dc247726ae89cc8739574261718e328"; rev = "e57024f821c94caf5684964474073649b8b6356b";
}; };
dir.secrets = { dir.secrets = {
host = config.krebs.hosts.wu; host = config.krebs.hosts.wu;

View File

@ -89,6 +89,7 @@ with lib;
pavucontrol pavucontrol
posix_man_pages posix_man_pages
pssh pssh
push
qrencode qrencode
sxiv sxiv
texLive texLive

View File

@ -35,6 +35,7 @@ let
nixos-infest = {}; nixos-infest = {};
nixpkgs = {}; nixpkgs = {};
painload = {}; painload = {};
push = {};
quipper = {}; quipper = {};
regfish = {}; regfish = {};
stockholm = { stockholm = {