summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-10-15 02:00:32 +0200
committertv <tv@shackspace.de>2015-10-15 02:00:32 +0200
commit7eb564d0eff22226a2e9955a3c239d1a770bde93 (patch)
tree52895199ea8deda688a4c02bce11b12224f8aa64 /krebs
parent521f74a4fe4635fc9b7366ac928c5066626496d1 (diff)
push: init at 1.0.0
Diffstat (limited to 'krebs')
-rw-r--r--krebs/5pkgs/default.nix4
-rw-r--r--krebs/5pkgs/push/default.nix48
2 files changed, 52 insertions, 0 deletions
diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix
index 9b059f04..a8a1b585 100644
--- a/krebs/5pkgs/default.nix
+++ b/krebs/5pkgs/default.nix
@@ -9,6 +9,10 @@ in
subdirs // rec {
+ push = pkgs'.callPackage ./push {
+ inherit (subdirs) get jq;
+ };
+
execve = name: { filename, argv, envp ? {}, destination ? "" }:
writeC name { inherit destination; } ''
#include <unistd.h>
diff --git a/krebs/5pkgs/push/default.nix b/krebs/5pkgs/push/default.nix
new file mode 100644
index 00000000..ce496d9c
--- /dev/null
+++ b/krebs/5pkgs/push/default.nix
@@ -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
+ '';
+}
+