summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2016-03-10 08:03:41 +0100
committermakefu <github@syntax-fehler.de>2016-03-10 08:03:41 +0100
commitdcf8e3fb32d795c3578d0618baf1bac8e6cfd960 (patch)
tree4775737cd24b4ff2fd8a3e809950d208546fd43b /krebs/5pkgs
parent2741e97fc0a950511961211e7aab15b5eb4eb635 (diff)
parent198407f70fdeacaae5dac6e4ec305629a5368410 (diff)
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'krebs/5pkgs')
-rw-r--r--krebs/5pkgs/builders.nix2
-rw-r--r--krebs/5pkgs/cac-api/default.nix2
-rw-r--r--krebs/5pkgs/cgit/default.nix64
-rw-r--r--krebs/5pkgs/default.nix23
-rw-r--r--krebs/5pkgs/dic/default.nix2
-rw-r--r--krebs/5pkgs/exim/default.nix63
-rw-r--r--krebs/5pkgs/fortclientsslvpn/default.nix2
-rw-r--r--krebs/5pkgs/get/default.nix2
-rw-r--r--krebs/5pkgs/git-hooks/default.nix2
-rw-r--r--krebs/5pkgs/github-hosts-sync/default.nix2
-rw-r--r--krebs/5pkgs/hashPassword/default.nix2
-rw-r--r--krebs/5pkgs/nq/default.nix16
-rw-r--r--krebs/5pkgs/push/default.nix2
13 files changed, 154 insertions, 30 deletions
diff --git a/krebs/5pkgs/builders.nix b/krebs/5pkgs/builders.nix
index fa51857ba..146e6f9e1 100644
--- a/krebs/5pkgs/builders.nix
+++ b/krebs/5pkgs/builders.nix
@@ -29,7 +29,7 @@ rec {
execveBin = name: cfg: execve name (cfg // { destination = "/bin/${name}"; });
writeC = name: { destination ? "" }: src: pkgs.runCommand name {} ''
- PATH=${makeSearchPath "bin" (with pkgs; [
+ PATH=${makeBinPath (with pkgs; [
binutils
coreutils
gcc
diff --git a/krebs/5pkgs/cac-api/default.nix b/krebs/5pkgs/cac-api/default.nix
index 52ada4f1b..85a906e1d 100644
--- a/krebs/5pkgs/cac-api/default.nix
+++ b/krebs/5pkgs/cac-api/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
mkdir -p $out/bin
{ cat <<\EOF
#! ${dash}/bin/dash
- export PATH=${stdenv.lib.makeSearchPath "bin" [
+ export PATH=${stdenv.lib.makeBinPath [
bc
coreutils
curl
diff --git a/krebs/5pkgs/cgit/default.nix b/krebs/5pkgs/cgit/default.nix
new file mode 100644
index 000000000..3180a5bd3
--- /dev/null
+++ b/krebs/5pkgs/cgit/default.nix
@@ -0,0 +1,64 @@
+{ stdenv, fetchurl, openssl, zlib, asciidoc, libxml2, libxslt
+, docbook_xml_xslt, pkgconfig, luajit
+, gzip, bzip2, xz
+}:
+
+stdenv.mkDerivation rec {
+ name = "cgit-${version}";
+ version = "0.12";
+
+ src = fetchurl {
+ url = "http://git.zx2c4.com/cgit/snapshot/${name}.tar.xz";
+ sha256 = "1dx54hgfyabmg9nm5qp6d01f54nlbqbbdwhwl0llb9imjf237qif";
+ };
+
+ # cgit is tightly coupled with git and needs a git source tree to build.
+ # IMPORTANT: Remember to check which git version cgit needs on every version
+ # bump (look in the Makefile).
+ # NOTE: as of 0.10.1, the git version is compatible from 1.9.0 to
+ # 1.9.2 (see the repository history)
+ gitSrc = fetchurl {
+ url = "mirror://kernel/software/scm/git/git-2.7.2.tar.xz";
+ sha256 = "086ga30ksijfxad085ply83ddf955d2b8qxph5sw6c9hab77j15j";
+ };
+
+ buildInputs = [
+ openssl zlib asciidoc libxml2 libxslt docbook_xml_xslt pkgconfig luajit
+ ];
+
+ postPatch = ''
+ sed -e 's|"gzip"|"${gzip}/bin/gzip"|' \
+ -e 's|"bzip2"|"${bzip2}/bin/bzip2"|' \
+ -e 's|"xz"|"${xz}/bin/xz"|' \
+ -i ui-snapshot.c
+ '';
+
+ # Give cgit a git source tree and pass configuration parameters (as make
+ # variables).
+ preBuild = ''
+ mkdir -p git
+ tar --strip-components=1 -xf "$gitSrc" -C git
+
+ makeFlagsArray+=(prefix="$out" CGIT_SCRIPT_PATH="$out/cgit/")
+ '';
+
+ # Install manpage.
+ postInstall = ''
+ # xmllint fails:
+ #make install-man
+
+ # bypassing xmllint works:
+ a2x --no-xmllint -f manpage cgitrc.5.txt
+ mkdir -p "$out/share/man/man5"
+ cp cgitrc.5 "$out/share/man/man5"
+ '';
+
+ meta = {
+ homepage = http://git.zx2c4.com/cgit/about/;
+ repositories.git = git://git.zx2c4.com/cgit;
+ description = "Web frontend for git repositories";
+ license = stdenv.lib.licenses.gpl2;
+ platforms = stdenv.lib.platforms.linux;
+ maintainers = with stdenv.lib.maintainers; [ bjornfor ];
+ };
+}
diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix
index f7997dd63..0c39324a7 100644
--- a/krebs/5pkgs/default.nix
+++ b/krebs/5pkgs/default.nix
@@ -1,7 +1,20 @@
{ config, lib, pkgs, ... }@args:
with config.krebs.lib;
{
- nixpkgs.config.packageOverrides = pkgs: {
+ nixpkgs.config.packageOverrides = pkgs: let
+
+ # This callPackage will try to detect obsolete overrides.
+ callPackage = path: args: let
+ override = pkgs.callPackage path args;
+ upstream = optionalAttrs (override ? "name")
+ (pkgs.${(parseDrvName override.name).name} or {});
+ in if upstream ? "name" &&
+ override ? "name" &&
+ compareVersions upstream.name override.name != -1
+ then trace "Upstream `${upstream.name}' gets overridden by `${override.name}'." override
+ else override;
+
+ in {
haskellPackages = pkgs.haskellPackages.override {
overrides = self: super:
mapAttrs (name: path: self.callPackage path {})
@@ -16,18 +29,18 @@ with config.krebs.lib;
(builtins.readDir ./haskell-overrides));
};
- push = pkgs.callPackage ./push {
+ push = callPackage ./push {
inherit (subdirs) get;
};
- ReaktorPlugins = pkgs.callPackage ./Reaktor/plugins.nix {};
+ ReaktorPlugins = callPackage ./Reaktor/plugins.nix {};
test = {
- infest-cac-centos7 = pkgs.callPackage ./test/infest-cac-centos7 {};
+ infest-cac-centos7 = callPackage ./test/infest-cac-centos7 {};
};
}
// import ./builders.nix args
- // mapAttrs (_: flip pkgs.callPackage {})
+ // mapAttrs (_: flip callPackage {})
(filterAttrs (_: dir.has-default-nix)
(subdirsOf ./.));
}
diff --git a/krebs/5pkgs/dic/default.nix b/krebs/5pkgs/dic/default.nix
index 571773d22..3566de8cd 100644
--- a/krebs/5pkgs/dic/default.nix
+++ b/krebs/5pkgs/dic/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
installPhase =
let
- path = stdenv.lib.makeSearchPath "bin" [
+ path = stdenv.lib.makeBinPath [
coreutils
curl
gnused
diff --git a/krebs/5pkgs/exim/default.nix b/krebs/5pkgs/exim/default.nix
new file mode 100644
index 000000000..d8d1f0dc3
--- /dev/null
+++ b/krebs/5pkgs/exim/default.nix
@@ -0,0 +1,63 @@
+{ coreutils, fetchurl, db, openssl, pcre, perl, pkgconfig, stdenv }:
+
+stdenv.mkDerivation rec {
+ name = "exim-4.86.2";
+
+ src = fetchurl {
+ url = "http://mirror.switch.ch/ftp/mirror/exim/exim/exim4/${name}.tar.bz2";
+ sha256 = "1cvfcc1hi60lydv8h3a2rxlfc0v2nflwpvzjj7h7cdsqs2pxwmkp";
+ };
+
+ buildInputs = [ coreutils db openssl pcre perl pkgconfig ];
+
+ preBuild = ''
+ sed '
+ s:^\(BIN_DIRECTORY\)=.*:\1='"$out"'/bin:
+ s:^\(CONFIGURE_FILE\)=.*:\1=/etc/exim.conf:
+ s:^\(EXIM_USER\)=.*:\1=ref\:nobody:
+ s:^\(SPOOL_DIRECTORY\)=.*:\1=/exim-homeless-shelter:
+ s:^# \(SUPPORT_MAILDIR\)=.*:\1=yes:
+ s:^EXIM_MONITOR=.*$:# &:
+ s:^\(FIXED_NEVER_USERS\)=root$:\1=0:
+ s:^# \(WITH_CONTENT_SCAN\)=.*:\1=yes:
+ s:^# \(AUTH_PLAINTEXT\)=.*:\1=yes:
+ s:^# \(SUPPORT_TLS\)=.*:\1=yes:
+ s:^# \(USE_OPENSSL_PC=openssl\)$:\1:
+ s:^# \(LOG_FILE_PATH=syslog\)$:\1:
+ s:^# \(HAVE_IPV6=yes\)$:\1:
+ s:^# \(CHOWN_COMMAND\)=.*:\1=${coreutils}/bin/chown:
+ s:^# \(CHGRP_COMMAND\)=.*:\1=${coreutils}/bin/chgrp:
+ s:^# \(CHMOD_COMMAND\)=.*:\1=${coreutils}/bin/chmod:
+ s:^# \(MV_COMMAND\)=.*:\1=${coreutils}/bin/mv:
+ s:^# \(RM_COMMAND\)=.*:\1=${coreutils}/bin/rm:
+ s:^# \(TOUCH_COMMAND\)=.*:\1=${coreutils}/bin/touch:
+ s:^# \(PERL_COMMAND\)=.*:\1=${perl}/bin/perl:
+ #/^\s*#.*/d
+ #/^\s*$/d
+ ' < src/EDITME > Local/Makefile
+ '';
+
+ installPhase = ''
+ mkdir -p $out/bin $out/share/man/man8
+ cp doc/exim.8 $out/share/man/man8
+
+ ( cd build-Linux-*
+ cp exicyclog exim_checkaccess exim_dumpdb exim_lock exim_tidydb \
+ exipick exiqsumm exigrep exim_dbmbuild exim exim_fixdb eximstats \
+ exinext exiqgrep exiwhat \
+ $out/bin )
+
+ ( cd $out/bin
+ for i in mailq newaliases rmail rsmtp runq sendmail; do
+ ln -s exim $i
+ done )
+ '';
+
+ meta = {
+ homepage = http://exim.org/;
+ description = "A mail transfer agent (MTA)";
+ license = stdenv.lib.licenses.gpl3;
+ platforms = stdenv.lib.platforms.linux;
+ maintainers = [ stdenv.lib.maintainers.tv ];
+ };
+}
diff --git a/krebs/5pkgs/fortclientsslvpn/default.nix b/krebs/5pkgs/fortclientsslvpn/default.nix
index e1c813479..602766f46 100644
--- a/krebs/5pkgs/fortclientsslvpn/default.nix
+++ b/krebs/5pkgs/fortclientsslvpn/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
buildInputs = [ makeWrapper ];
- binPath = lib.makeSearchPath "bin" [
+ binPath = lib.makeBinPath [
coreutils
gawk
];
diff --git a/krebs/5pkgs/get/default.nix b/krebs/5pkgs/get/default.nix
index 13cdeca96..f82c7e8b7 100644
--- a/krebs/5pkgs/get/default.nix
+++ b/krebs/5pkgs/get/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
installPhase =
let
- path = stdenv.lib.makeSearchPath "bin" [
+ path = stdenv.lib.makeBinPath [
coreutils
gnugrep
gnused
diff --git a/krebs/5pkgs/git-hooks/default.nix b/krebs/5pkgs/git-hooks/default.nix
index 5697c31be..3aba90535 100644
--- a/krebs/5pkgs/git-hooks/default.nix
+++ b/krebs/5pkgs/git-hooks/default.nix
@@ -12,7 +12,7 @@ let
#! /bin/sh
set -euf
- export PATH=${makeSearchPath "bin" (with pkgs; [
+ export PATH=${makeBinPath (with pkgs; [
coreutils
git
gnused
diff --git a/krebs/5pkgs/github-hosts-sync/default.nix b/krebs/5pkgs/github-hosts-sync/default.nix
index b9dcfa9b8..0dcbe7fd8 100644
--- a/krebs/5pkgs/github-hosts-sync/default.nix
+++ b/krebs/5pkgs/github-hosts-sync/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
installPhase =
let
ca-bundle = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
- path = stdenv.lib.makeSearchPath "bin" (with pkgs; [
+ path = stdenv.lib.makeBinPath (with pkgs; [
coreutils
findutils
git
diff --git a/krebs/5pkgs/hashPassword/default.nix b/krebs/5pkgs/hashPassword/default.nix
index a10340cc4..6a7c51c57 100644
--- a/krebs/5pkgs/hashPassword/default.nix
+++ b/krebs/5pkgs/hashPassword/default.nix
@@ -5,7 +5,7 @@ pkgs.writeScriptBin "hashPassword" ''
# usage: hashPassword
set -euf
- export PATH=${lib.makeSearchPath "bin" (with pkgs; [
+ export PATH=${lib.makeBinPath (with pkgs; [
coreutils
mkpasswd
openssl
diff --git a/krebs/5pkgs/nq/default.nix b/krebs/5pkgs/nq/default.nix
deleted file mode 100644
index 0f397a43c..000000000
--- a/krebs/5pkgs/nq/default.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ fetchgit, stdenv }:
-
-stdenv.mkDerivation rec {
- name = "nq-${rev}";
- rev = "0eae839cb1";
-
- src = fetchgit {
- url = https://github.com/chneukirchen/nq;
- inherit rev;
- sha256 = "1150274750cde934932d65bd6053d7a0ba2404a59eadfb87fc6bd8a4fb70febb";
- };
-
- configurePhase = ''
- sed -i "s:^PREFIX=.*:PREFIX=$out:" Makefile
- '';
-}
diff --git a/krebs/5pkgs/push/default.nix b/krebs/5pkgs/push/default.nix
index aa17a21a9..9a627fe36 100644
--- a/krebs/5pkgs/push/default.nix
+++ b/krebs/5pkgs/push/default.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation {
installPhase =
let
- path = lib.makeSearchPath "bin" [
+ path = lib.makeBinPath [
coreutils
git
gnumake