summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/default.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2016-03-06 20:56:02 +0100
committermakefu <github@syntax-fehler.de>2016-03-06 20:56:02 +0100
commit2fd7d1b1ab10dbd84cf85ebf149a12f3a92d7815 (patch)
tree8e1b4f1acb8a20905df26dcbeb36a6802e5fe1d3 /krebs/5pkgs/default.nix
parente8679ae6c0fd33be9c84a671d2ebfae51f5851f0 (diff)
parent198407f70fdeacaae5dac6e4ec305629a5368410 (diff)
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'krebs/5pkgs/default.nix')
-rw-r--r--krebs/5pkgs/default.nix23
1 files changed, 18 insertions, 5 deletions
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 ./.));
}