diff options
author | lassulus <lass@aidsballs.de> | 2016-03-05 23:50:50 +0100 |
---|---|---|
committer | lassulus <lass@aidsballs.de> | 2016-03-05 23:50:50 +0100 |
commit | 0115e0ee85c3ecc05b709d0f036253e52367a1a1 (patch) | |
tree | 997634737c8b337646cfd83b1fac2de956a823bc /krebs/5pkgs/default.nix | |
parent | 1ba917c3337c9a954e5c251b137ea3ea2ce62f81 (diff) | |
parent | 198407f70fdeacaae5dac6e4ec305629a5368410 (diff) |
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'krebs/5pkgs/default.nix')
-rw-r--r-- | krebs/5pkgs/default.nix | 23 |
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 ./.)); } |