summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-03-05 22:23:57 +0100
committertv <tv@krebsco.de>2016-03-05 22:26:43 +0100
commitbbc59a85a8b1bbc369c34666638b94d4b671665a (patch)
tree865ac2c817d9df5253c023e083fb5bded25e2a71 /krebs/5pkgs
parented1ffc8c8326e5c1f27eae85fe8c4a28d7531a1d (diff)
krebs pkgs: detect old overrides
Diffstat (limited to 'krebs/5pkgs')
-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 ./.));
}