summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/5pkgs')
-rw-r--r--krebs/5pkgs/simple/buildbot-classic-slave/default.nix21
-rw-r--r--krebs/5pkgs/simple/buildbot-classic/default.nix47
-rw-r--r--krebs/5pkgs/simple/populate/default.nix4
-rw-r--r--krebs/5pkgs/writers.nix9
4 files changed, 77 insertions, 4 deletions
diff --git a/krebs/5pkgs/simple/buildbot-classic-slave/default.nix b/krebs/5pkgs/simple/buildbot-classic-slave/default.nix
new file mode 100644
index 000000000..c316889e4
--- /dev/null
+++ b/krebs/5pkgs/simple/buildbot-classic-slave/default.nix
@@ -0,0 +1,21 @@
+{ coreutils, fetchgit, fetchFromGitHub, buildbot-classic, python2Packages, ... }:
+
+python2Packages.buildPythonApplication {
+ name = "buildbot-classic-slave-0.8.12";
+ namePrefix = "";
+
+ src = buildbot-classic.src;
+ postUnpack = "sourceRoot=\${sourceRoot}/slave";
+
+ patchPhase = ''
+ substituteInPlace buildslave/scripts/logwatcher.py --replace /usr/bin/tail ${coreutils}/bin/tail
+ '';
+
+ propagatedBuildInputs = [ python2Packages.twisted ];
+ doCheck = false;
+
+ postInstall = ''
+ mkdir -p "$out/share/man/man1"
+ cp docs/buildslave.1 "$out/share/man/man1"
+ '';
+}
diff --git a/krebs/5pkgs/simple/buildbot-classic/default.nix b/krebs/5pkgs/simple/buildbot-classic/default.nix
new file mode 100644
index 000000000..a3d924c4a
--- /dev/null
+++ b/krebs/5pkgs/simple/buildbot-classic/default.nix
@@ -0,0 +1,47 @@
+{ fetchgit, fetchFromGitHub, python2Packages, ... }:
+let
+ # https://github.com/NixOS/nixpkgs/issues/14026
+ nixpkgs-fix = import (fetchgit {
+ url = https://github.com/nixos/nixpkgs;
+ rev = "e026b5c243ea39810826e68362718f5d703fb5d0";
+ sha256 = "11lqd480bi6xbi7xbh4krrxmbp6a6iafv1d0q3sj461al0x0has8";
+ }) {};
+
+in nixpkgs-fix.buildPythonApplication {
+ name = "buildbot-classic-0.8.12";
+ namePrefix = "";
+ patches = [];
+
+ src = fetchFromGitHub {
+ owner = "krebscode";
+ repo = "buildbot-classic";
+ rev = "5b4f5f6f1";
+ sha256 = "1j3xn1gjzvsf90jvfmyln71fzlhjx642ivrqf47zfxpkacljja93";
+ };
+ postUnpack = "sourceRoot=\${sourceRoot}/master";
+
+ patchPhase =
+ # The code insists on /usr/bin/tail, /usr/bin/make, etc.
+ '' echo "patching erroneous absolute path references..."
+ for i in $(find -name \*.py)
+ do
+ sed -i "$i" \
+ -e "s|/usr/bin/python|$(type -P python)|g ; s|/usr/bin/||g"
+ done
+
+ sed -i 's/==/>=/' setup.py
+ '';
+
+ propagatedBuildInputs = [
+ python2Packages.jinja2
+ python2Packages.twisted
+ nixpkgs-fix.pythonPackages.dateutil_1_5
+ nixpkgs-fix.pythonPackages.sqlalchemy_migrate_0_7
+ ];
+ doCheck = false;
+ postInstall = ''
+ mkdir -p "$out/share/man/man1"
+ cp docs/buildbot.1 "$out/share/man/man1"
+ '';
+}
+
diff --git a/krebs/5pkgs/simple/populate/default.nix b/krebs/5pkgs/simple/populate/default.nix
index 3ec432229..c2ca00590 100644
--- a/krebs/5pkgs/simple/populate/default.nix
+++ b/krebs/5pkgs/simple/populate/default.nix
@@ -13,12 +13,12 @@ in
stdenv.mkDerivation rec {
name = "populate";
- version = "1.2.0";
+ version = "1.2.1";
src = fetchgit {
url = http://cgit.ni.krebsco.de/populate;
rev = "refs/tags/v${version}";
- sha256 = "0q3110hkkxn9bc3a63xbx1hyd1fpzz4wrck4lng3j5a9i1y1jm07";
+ sha256 = "13viizpmjkqxc3d9mk2bzspgnal07bma5m9lc90mcdlk36na3pkq";
};
phases = [
diff --git a/krebs/5pkgs/writers.nix b/krebs/5pkgs/writers.nix
index 49ca3557e..f1626078e 100644
--- a/krebs/5pkgs/writers.nix
+++ b/krebs/5pkgs/writers.nix
@@ -144,9 +144,14 @@ with import <stockholm/lib>;
env = filevars // { passAsFile = attrNames filevars; };
in
+ # Use a subshell because <nixpkgs/stdenv/generic/setup.sh>'s genericBuild
+ # sources (or evaluates) the buildCommand and we don't want to modify its
+ # shell. In particular, exitHandler breaks in multiple ways with set -u.
pkgs.runCommand name env /* sh */ ''
- set -efu
- ${concatMapStringsSep "\n" (getAttr "install") files}
+ (
+ set -efu
+ ${concatMapStringsSep "\n" (getAttr "install") files}
+ )
'';
writeHaskell =