summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ci.nix2
-rw-r--r--krebs/3modules/ci.nix25
-rw-r--r--krebs/5pkgs/simple/ejabberd/default.nix122
-rw-r--r--krebs/5pkgs/simple/ejabberd/ejabberdctl.patch32
-rw-r--r--lass/3modules/ejabberd/config.nix1
-rw-r--r--makefu/2configs/hw/smartcard.nix7
m---------submodules/krops0
-rw-r--r--tv/2configs/gitrepos.nix1
-rw-r--r--tv/3modules/ejabberd/config.nix1
-rw-r--r--tv/5pkgs/simple/hc.nix37
10 files changed, 68 insertions, 160 deletions
diff --git a/ci.nix b/ci.nix
index 6f4b89b08..631c3dc41 100644
--- a/ci.nix
+++ b/ci.nix
@@ -1,4 +1,4 @@
-# usage: nix-instantiate --eval --strict --json ./ci.nix
+# usage: nix-instantiate --eval --json --read-write-mode --strict ci.nix | jq .
with import ./lib;
let
pkgs = import <nixpkgs> { overlays = [ (import ./submodules/nix-writers/pkgs) ]; };
diff --git a/krebs/3modules/ci.nix b/krebs/3modules/ci.nix
index 16c6d4315..4cfe598d6 100644
--- a/krebs/3modules/ci.nix
+++ b/krebs/3modules/ci.nix
@@ -30,6 +30,8 @@ let
nix-instantiate --quiet -Q --eval --strict --json ./ci.nix
'';
+ profileRoot = "/nix/var/nix/profiles/ci";
+
imp = {
krebs.buildbot.master = {
slaves = {
@@ -98,9 +100,16 @@ let
self.addBuildSteps([steps.ShellCommand(
name=str(new_step),
command=[
- new_steps[new_step]
+ "${pkgs.writeDash "build-stepper.sh" ''
+ set -efu
+ profile=${shell.escape profileRoot}/$build_name
+ result=$("$build_script")
+ ${pkgs.nix}/bin/nix-env -p "$profile" --set "$result"
+ ''}"
],
env={
+ "build_name": new_step,
+ "build_script": new_steps[new_step],
"NIX_REMOTE": "daemon",
"NIX_PATH": "secrets=/var/src/stockholm/null:/var/src",
},
@@ -163,6 +172,20 @@ let
password = "lasspass";
packages = with pkgs; [ gnumake jq nix populate gnutar lzma gzip ];
};
+
+ system.activationScripts.buildbots-nix-profile = ''
+ ${pkgs.coreutils}/bin/mkdir -p ${shell.escape profileRoot}
+ ${pkgs.coreutils}/bin/chmod 0770 ${shell.escape profileRoot}
+ ${pkgs.coreutils}/bin/chgrp buildbots ${shell.escape profileRoot}
+ '';
+
+ users = {
+ groups.buildbots.gid = genid "buildbots";
+ users = {
+ buildbotMaster.extraGroups = [ "buildbots" ];
+ buildbotSlave.extraGroups = [ "buildbots" ];
+ };
+ };
};
in out
diff --git a/krebs/5pkgs/simple/ejabberd/default.nix b/krebs/5pkgs/simple/ejabberd/default.nix
deleted file mode 100644
index b4ab13b43..000000000
--- a/krebs/5pkgs/simple/ejabberd/default.nix
+++ /dev/null
@@ -1,122 +0,0 @@
-{ stdenv, writeScriptBin, lib, fetchurl, git, cacert
-, erlang, openssl, expat, libyaml, bash, gnused, gnugrep, coreutils, utillinux, procps, gd
-, withMysql ? false
-, withPgsql ? false
-, withSqlite ? false, sqlite
-, withPam ? false, pam
-, withZlib ? true, zlib
-, withRiak ? false
-, withElixir ? false, elixir
-, withIconv ? true
-, withTools ? false
-, withRedis ? false
-}:
-
-let
- fakegit = writeScriptBin "git" ''
- #! ${stdenv.shell} -e
- if [ "$1" = "describe" ]; then
- [ -r .rev ] && cat .rev || true
- fi
- '';
-
- ctlpath = lib.makeBinPath [ bash gnused gnugrep coreutils utillinux procps ];
-
-in stdenv.mkDerivation rec {
- version = "18.01";
- name = "ejabberd-${version}";
-
- src = fetchurl {
- url = "http://www.process-one.net/downloads/ejabberd/${version}/${name}.tgz";
- sha256 = "01i2n8mlgw293jdf4172f9q8ca8m35vysjws791p7nynpfdb4cn6";
- };
-
- nativeBuildInputs = [ fakegit ];
-
- buildInputs = [ erlang openssl expat libyaml gd ]
- ++ lib.optional withSqlite sqlite
- ++ lib.optional withPam pam
- ++ lib.optional withZlib zlib
- ++ lib.optional withElixir elixir
- ;
-
- # Apparently needed for Elixir
- LANG = "en_US.UTF-8";
-
- deps = stdenv.mkDerivation {
- name = "ejabberd-deps-${version}";
-
- inherit src;
-
- configureFlags = [ "--enable-all" "--with-sqlite3=${sqlite.dev}" ];
-
- nativeBuildInputs = [ git erlang openssl expat libyaml sqlite pam zlib elixir ];
-
- GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
-
- makeFlags = [ "deps" ];
-
- phases = [ "unpackPhase" "configurePhase" "buildPhase" "installPhase" ];
-
- installPhase = ''
- for i in deps/*; do
- ( cd $i
- git reset --hard
- git clean -ffdx
- git describe --always --tags > .rev
- rm -rf .git
- )
- done
- rm deps/.got
-
- cp -r deps $out
- '';
-
- outputHashMode = "recursive";
- outputHashAlgo = "sha256";
- outputHash = "1v3h0c7kfifb6wsfxyv5j1wc7rlxbb7r0pgd4s340wiyxnllzzhk";
- };
-
- configureFlags =
- [ (lib.enableFeature withMysql "mysql")
- (lib.enableFeature withPgsql "pgsql")
- (lib.enableFeature withSqlite "sqlite")
- (lib.enableFeature withPam "pam")
- (lib.enableFeature withZlib "zlib")
- (lib.enableFeature withRiak "riak")
- (lib.enableFeature withElixir "elixir")
- (lib.enableFeature withIconv "iconv")
- (lib.enableFeature withTools "tools")
- (lib.enableFeature withRedis "redis")
- ] ++ lib.optional withSqlite "--with-sqlite3=${sqlite.dev}";
-
- enableParallelBuilding = true;
-
- patches = [
- ./ejabberdctl.patch
- ];
-
- preBuild = ''
- cp -r $deps deps
- chmod -R +w deps
- patchShebangs deps
- '';
-
- postInstall = ''
- sed -i \
- -e '2iexport PATH=${ctlpath}:$PATH' \
- -e 's,\(^ *FLOCK=\).*,\1${utillinux}/bin/flock,' \
- -e 's,\(^ *JOT=\).*,\1,' \
- -e 's,\(^ *CONNLOCKDIR=\).*,\1/var/lock/ejabberdctl,' \
- $out/sbin/ejabberdctl
- '';
-
- meta = with stdenv.lib; {
- description = "Open-source XMPP application server written in Erlang";
- license = licenses.gpl2;
- homepage = http://www.ejabberd.im;
- platforms = platforms.linux;
- maintainers = with maintainers; [ sander abbradar ];
- broken = withElixir;
- };
-}
diff --git a/krebs/5pkgs/simple/ejabberd/ejabberdctl.patch b/krebs/5pkgs/simple/ejabberd/ejabberdctl.patch
deleted file mode 100644
index f7c842b7b..000000000
--- a/krebs/5pkgs/simple/ejabberd/ejabberdctl.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/ejabberdctl.template 1970-01-01 01:00:01.000000000 +0100
-+++ b/ejabberdctl.template 2018-04-24 23:06:54.127715441 +0200
-@@ -42,19 +42,18 @@
- esac
-
- # parse command line parameters
--for arg; do
-- case $arg in
-- -n|--node) ERLANG_NODE_ARG=$2; shift;;
-- -s|--spool) SPOOL_DIR=$2; shift;;
-- -l|--logs) LOGS_DIR=$2; shift;;
-- -f|--config) EJABBERD_CONFIG_PATH=$2; shift;;
-- -c|--ctl-config) EJABBERDCTL_CONFIG_PATH=$2; shift;;
-- -d|--config-dir) ETC_DIR=$2; shift;;
-- -t|--no-timeout) NO_TIMEOUT="--no-timeout";;
-- --) :;;
-+while test $# -gt 0; do
-+ case $1 in
-+ -n|--node) ERLANG_NODE_ARG=$2; shift 2;;
-+ -s|--spool) SPOOL_DIR=$2; shift 2;;
-+ -l|--logs) LOGS_DIR=$2; shift 2;;
-+ -f|--config) EJABBERD_CONFIG_PATH=$2; shift 2;;
-+ -c|--ctl-config) EJABBERDCTL_CONFIG_PATH=$2; shift 2;;
-+ -d|--config-dir) ETC_DIR=$2; shift 2;;
-+ -t|--no-timeout) NO_TIMEOUT="--no-timeout"; shift 1;;
-+ # --) :;; what is this for?
- *) break;;
- esac
-- shift
- done
-
- # define ejabberd variables if not already defined from the command line
diff --git a/lass/3modules/ejabberd/config.nix b/lass/3modules/ejabberd/config.nix
index e7288313a..4630f25c1 100644
--- a/lass/3modules/ejabberd/config.nix
+++ b/lass/3modules/ejabberd/config.nix
@@ -87,7 +87,6 @@ in /* yaml */ ''
mod_configure: {}
mod_disco: {}
mod_echo: {}
- mod_irc: {}
mod_bosh: {}
mod_last: {}
mod_offline:
diff --git a/makefu/2configs/hw/smartcard.nix b/makefu/2configs/hw/smartcard.nix
index 1e9bca53b..b66b70098 100644
--- a/makefu/2configs/hw/smartcard.nix
+++ b/makefu/2configs/hw/smartcard.nix
@@ -2,12 +2,15 @@
{
services.pcscd = {
enable = true;
- plugins = with pkgs; [ ifdnfc ccid ];
+ plugins = with pkgs;
+ [ #ifdnfc
+ ccid
+ ];
};
environment.systemPackages = with pkgs; [
# need to run ifdnfc-activate before usage
- ifdnfc
+ # ifdnfc
# pcsc_scan
pcsctools
];
diff --git a/submodules/krops b/submodules/krops
-Subproject e2b29654251367545700154ffbac806705dd04c
+Subproject ce37b2a9c2a438b7278e8e8ab045df34f00ad38
diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix
index 62c90d4e9..a89d1302c 100644
--- a/tv/2configs/gitrepos.nix
+++ b/tv/2configs/gitrepos.nix
@@ -76,6 +76,7 @@ let {
};
} // mapAttrs (_: recursiveUpdate { cgit.section = "3. Haskell libraries"; }) {
blessings = {};
+ hc = {};
mime = {};
quipper = {};
scanner = {};
diff --git a/tv/3modules/ejabberd/config.nix b/tv/3modules/ejabberd/config.nix
index 68bcfa340..a0631e226 100644
--- a/tv/3modules/ejabberd/config.nix
+++ b/tv/3modules/ejabberd/config.nix
@@ -87,7 +87,6 @@ in /* yaml */ ''
mod_configure: {}
mod_disco: {}
mod_echo: {}
- mod_irc: {}
mod_bosh: {}
mod_last: {}
mod_offline:
diff --git a/tv/5pkgs/simple/hc.nix b/tv/5pkgs/simple/hc.nix
new file mode 100644
index 000000000..4d325e16c
--- /dev/null
+++ b/tv/5pkgs/simple/hc.nix
@@ -0,0 +1,37 @@
+{ coreutils, fetchgit, findutils, gawk, gnugrep, makeWrapper, qrencode, stdenv, texlive, utillinux, zbar }:
+
+stdenv.mkDerivation rec {
+ name = "hc-${meta.version}";
+
+ src = fetchgit {
+ url = "https://cgit.krebsco.de/hc";
+ rev = "refs/tags/v${meta.version}";
+ sha256 = "09349gja22p0j3xs082kp0fnaaada14bafszn4r3q7rg1id2slfb";
+ };
+
+ nativeBuildInputs = [ makeWrapper ];
+
+ buildPhase = null;
+
+ installPhase = ''
+ mkdir -p $out/bin
+
+ cp $src/bin/hc $out/bin/hc
+
+ wrapProgram $out/bin/hc \
+ --prefix PATH : ${stdenv.lib.makeBinPath [
+ coreutils
+ findutils
+ gawk
+ gnugrep
+ qrencode
+ texlive.combined.scheme-full
+ utillinux
+ zbar
+ ]}
+ '';
+
+ meta = {
+ version = "1.0.0";
+ };
+}