summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs')
-rw-r--r--krebs/1systems/hotdog/config.nix2
-rw-r--r--krebs/1systems/puyak/config.nix1
-rw-r--r--krebs/1systems/wolf/config.nix1
-rw-r--r--krebs/2configs/binary-cache/nixos.nix12
-rw-r--r--krebs/3modules/buildbot/master.nix6
-rw-r--r--krebs/3modules/ci.nix6
-rw-r--r--krebs/5pkgs/simple/buildbot-classic-slave/default.nix4
-rw-r--r--krebs/5pkgs/simple/buildbot-classic/default.nix50
-rw-r--r--krebs/5pkgs/simple/electron-cash/default.nix64
-rw-r--r--krebs/5pkgs/simple/gi/default.nix30
-rw-r--r--krebs/5pkgs/writers.nix3
11 files changed, 134 insertions, 45 deletions
diff --git a/krebs/1systems/hotdog/config.nix b/krebs/1systems/hotdog/config.nix
index 3eb7b9aa1..4807307ff 100644
--- a/krebs/1systems/hotdog/config.nix
+++ b/krebs/1systems/hotdog/config.nix
@@ -10,6 +10,7 @@
<stockholm/krebs/2configs>
<stockholm/krebs/2configs/buildbot-all.nix>
+ <stockholm/krebs/2configs/binary-cache/nixos.nix>
];
krebs.build.host = config.krebs.hosts.hotdog;
@@ -21,4 +22,5 @@
OnUnitInactiveSec = "2min";
RandomizedDelaySec = "2min";
};
+ krebs.ci.stockholmSrc = "http://cgit.prism.r/stockholm";
}
diff --git a/krebs/1systems/puyak/config.nix b/krebs/1systems/puyak/config.nix
index deede4493..d4a4941ca 100644
--- a/krebs/1systems/puyak/config.nix
+++ b/krebs/1systems/puyak/config.nix
@@ -9,6 +9,7 @@
<stockholm/krebs/2configs/buildbot-krebs.nix>
<stockholm/krebs/2configs/stats/puyak-client.nix>
+ <stockholm/krebs/2configs/binary-cache/nixos.nix>
<stockholm/krebs/2configs/binary-cache/prism.nix>
];
diff --git a/krebs/1systems/wolf/config.nix b/krebs/1systems/wolf/config.nix
index ec9c78db5..91aabb716 100644
--- a/krebs/1systems/wolf/config.nix
+++ b/krebs/1systems/wolf/config.nix
@@ -13,6 +13,7 @@ in
<stockholm/krebs/2configs/graphite.nix>
<stockholm/krebs/2configs/buildbot-krebs.nix>
+ <stockholm/krebs/2configs/binary-cache/nixos.nix>
<stockholm/krebs/2configs/binary-cache/prism.nix>
<stockholm/krebs/2configs/shack/worlddomination.nix>
diff --git a/krebs/2configs/binary-cache/nixos.nix b/krebs/2configs/binary-cache/nixos.nix
new file mode 100644
index 000000000..2ff5e1307
--- /dev/null
+++ b/krebs/2configs/binary-cache/nixos.nix
@@ -0,0 +1,12 @@
+{ config, ... }:
+
+{
+ nix = {
+ binaryCaches = [
+ "https://cache.nixos.org/"
+ ];
+ binaryCachePublicKeys = [
+ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
+ ];
+ };
+}
diff --git a/krebs/3modules/buildbot/master.nix b/krebs/3modules/buildbot/master.nix
index a7624c8f2..a02f3645d 100644
--- a/krebs/3modules/buildbot/master.nix
+++ b/krebs/3modules/buildbot/master.nix
@@ -341,8 +341,6 @@ let
secretsdir = shell.escape (toString <secrets>);
in {
PermissionsStartOnly = true;
- Type = "forking";
- PIDFile = "${workdir}/twistd.pid";
# TODO: maybe also prepare buildbot.tac?
ExecStartPre = pkgs.writeDash "buildbot-master-init" ''
set -efux
@@ -366,9 +364,7 @@ let
chmod 700 -R ${workdir}
chown buildbotMaster:buildbotMaster -R ${workdir}
'';
- ExecStart = "${pkgs.buildbot-classic}/bin/buildbot start ${workdir}";
- ExecStop = "${pkgs.buildbot-classic}/bin/buildbot stop ${workdir}";
- ExecReload = "${pkgs.buildbot-classic}/bin/buildbot reconfig ${workdir}";
+ ExecStart = "${pkgs.buildbot-classic}/bin/buildbot start --nodaemon ${workdir}";
PrivateTmp = "true";
User = "buildbotMaster";
Restart = "always";
diff --git a/krebs/3modules/ci.nix b/krebs/3modules/ci.nix
index 71e7d4aeb..b55827e3a 100644
--- a/krebs/3modules/ci.nix
+++ b/krebs/3modules/ci.nix
@@ -8,6 +8,10 @@ in
{
options.krebs.ci = {
enable = mkEnableOption "krebs continous integration";
+ stockholmSrc = mkOption {
+ type = types.str;
+ default = "http://cgit.${hostname}.r/stockholm";
+ };
treeStableTimer = mkOption {
type = types.int;
default = 10;
@@ -58,7 +62,7 @@ in
testslave = "lasspass";
};
change_source.stockholm = ''
- stockholm_repo = 'http://cgit.${hostname}.r/stockholm'
+ stockholm_repo = '${cfg.stockholmSrc}'
cs.append(
changes.GitPoller(
stockholm_repo,
diff --git a/krebs/5pkgs/simple/buildbot-classic-slave/default.nix b/krebs/5pkgs/simple/buildbot-classic-slave/default.nix
index bbc824a6a..a48c45ae0 100644
--- a/krebs/5pkgs/simple/buildbot-classic-slave/default.nix
+++ b/krebs/5pkgs/simple/buildbot-classic-slave/default.nix
@@ -1,14 +1,12 @@
{ coreutils, fetchgit, git, buildbot-classic, python2Packages, ... }:
python2Packages.buildPythonApplication {
- name = "buildbot-classic-slave-0.8.13";
+ name = "buildbot-classic-slave-${buildbot-classic.version}";
namePrefix = "";
src = buildbot-classic.src;
postUnpack = "sourceRoot=\${sourceRoot}/slave";
- patchPhase = ":";
-
nativeBuildInputs = [ git ];
propagatedBuildInputs = [ python2Packages.twisted ];
doCheck = false;
diff --git a/krebs/5pkgs/simple/buildbot-classic/default.nix b/krebs/5pkgs/simple/buildbot-classic/default.nix
index 353972109..9eeccee64 100644
--- a/krebs/5pkgs/simple/buildbot-classic/default.nix
+++ b/krebs/5pkgs/simple/buildbot-classic/default.nix
@@ -1,43 +1,27 @@
-{ fetchgit, fetchFromGitHub, python2Packages, git, ... }:
-let
- # https://github.com/NixOS/nixpkgs/issues/14026
- nixpkgs-fix = import (fetchgit {
- url = https://github.com/nixos/nixpkgs;
- rev = "e026b5c243ea39810826e68362718f5d703fb5d0";
- sha256 = "11lqd480bi6xbi7xbh4krrxmbp6a6iafv1d0q3sj461al0x0has8";
- }) {};
+{ pkgs, fetchFromGitHub, python2Packages, git, ... }:
-in nixpkgs-fix.buildPythonApplication {
- name = "buildbot-classic-0.8.13";
+python2Packages.buildPythonApplication rec {
+ name = "buildbot-classic-${version}";
+ version = "0.8.14";
namePrefix = "";
patches = [];
- src = fetchgit {
- url = "https://github.com/krebscode/buildbot-classic";
- rev = "211ec7815";
- sha256 = "0cyn406r31qdqhpsih7w83x47b443svpgfhxqd6w3iryv0y1z95i";
- leaveDotGit = true;
-
+ src = fetchFromGitHub {
+ owner = "krebscode";
+ repo = "buildbot-classic";
+ # rev = "v${version}";
+ rev = "843463911";
+ sha256 = "1ybl52ybjw5p09yik6bck9i1pvnvg94i0d32zqrwy67s77yx1mfd";
};
postUnpack = "sourceRoot=\${sourceRoot}/master";
- buildInputs = [ git ];
- 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 = with nixpkgs-fix.pythonPackages; [
- jinja2
- twisted
- dateutil_1_5
- sqlalchemy_migrate_0_7
+ propagatedBuildInputs = [
+ python2Packages.jinja2
+ python2Packages.twisted
+ python2Packages.dateutil_1_5
+ python2Packages.sqlalchemy_migrate
+ python2Packages.pysqlite
+ pkgs.coreutils
];
doCheck = false;
postInstall = ''
diff --git a/krebs/5pkgs/simple/electron-cash/default.nix b/krebs/5pkgs/simple/electron-cash/default.nix
new file mode 100644
index 000000000..e51136c60
--- /dev/null
+++ b/krebs/5pkgs/simple/electron-cash/default.nix
@@ -0,0 +1,64 @@
+{ stdenv, fetchFromGitHub, python2Packages }:
+
+python2Packages.buildPythonApplication rec {
+ name = "electron-cash-${src.rev}";
+
+ src = fetchFromGitHub {
+ owner = "fyookball";
+ repo = "electrum";
+ rev = "a2245ea";
+ sha256 = "1a0ym94azfd1yn97n2jcky344ajbj2amr9l6jpx30pqxndffpbgv";
+ };
+
+ propagatedBuildInputs = with python2Packages; [
+ dns
+ ecdsa
+ jsonrpclib
+ pbkdf2
+ pyaes
+ pycrypto
+ pyqt4
+ pysocks
+ qrcode
+ requests
+ tlslite
+
+ # plugins
+ keepkey
+ trezor
+ ];
+
+ preBuild = ''
+ sed -i 's,usr_share = .*,usr_share = "'$out'/share",g' setup.py
+ pyrcc4 icons.qrc -o gui/qt/icons_rc.py
+ # Recording the creation timestamps introduces indeterminism to the build
+ sed -i '/Created: .*/d' gui/qt/icons_rc.py
+ '';
+
+ postInstall = ''
+ # Despite setting usr_share above, these files are installed under
+ # $out/nix ...
+ mv $out/lib/python2.7/site-packages/nix/store"/"*/share $out
+ rm -rf $out/lib/python2.7/site-packages/nix
+
+ substituteInPlace $out/share/applications/electron.desktop \
+ --replace "Exec=electrum %u" "Exec=$out/bin/electrum %u"
+ '';
+
+ doInstallCheck = true;
+ installCheckPhase = ''
+ $out/bin/electrum help >/dev/null
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A lightweight Bitcoin wallet";
+ longDescription = ''
+ An easy-to-use Bitcoin client featuring wallets generated from
+ mnemonic seeds (in addition to other, more advanced, wallet options)
+ and the ability to perform transactions without downloading a copy
+ of the blockchain.
+ '';
+ homepage = https://electrum.org/;
+ license = licenses.mit;
+ };
+}
diff --git a/krebs/5pkgs/simple/gi/default.nix b/krebs/5pkgs/simple/gi/default.nix
new file mode 100644
index 000000000..88f518ea9
--- /dev/null
+++ b/krebs/5pkgs/simple/gi/default.nix
@@ -0,0 +1,30 @@
+{ fetchFromGitHub, lib, stdenv, ... }:
+
+stdenv.mkDerivation rec {
+ name = "gi";
+ version = "master";
+
+ src = fetchFromGitHub {
+ owner = "dspinellis";
+ repo = "gi";
+ rev = "684051e";
+ sha256 = "14jgfg0bpzhy7dyq3ff45syd3c324l1z6d3q14izvwk6cs11qs8m";
+ };
+
+ phases = [
+ "unpackPhase"
+ "installPhase"
+ ];
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp ./gi.sh $out/bin/gi
+ '';
+
+ meta = {
+ description = "a minimalist distributed issue management system based on Git.";
+ url = https://github.com/dspinellis/gi;
+ license = lib.licenses.gpl3;
+ platforms = lib.platforms.unix;
+ };
+}
diff --git a/krebs/5pkgs/writers.nix b/krebs/5pkgs/writers.nix
index 850ee6f1a..6e67ed699 100644
--- a/krebs/5pkgs/writers.nix
+++ b/krebs/5pkgs/writers.nix
@@ -43,9 +43,6 @@ with import <stockholm/lib>;
assert (with types; either absolute-pathname filename).check name;
pkgs.writeOut (baseNameOf name) {
${optionalString (types.absolute-pathname.check name) name} = {
- check = pkgs.writeDash "shellcheck.sh" ''
- ${pkgs.haskellPackages.ShellCheck}/bin/shellcheck "$1" || :
- '';
executable = true;
text = "#! ${pkgs.bash}/bin/bash\n${text}";
};