ma: refactor module loading of 5pkgs
This commit is contained in:
parent
899b16848a
commit
20d5077ba6
@ -1,25 +1,21 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
with import <stockholm/lib>;
|
with import <stockholm/lib>;
|
||||||
{
|
self: super: let
|
||||||
nixpkgs.config.packageOverrides = oldpkgs: let
|
|
||||||
|
|
||||||
# This callPackage will try to detect obsolete overrides.
|
# This callPackage will try to detect obsolete overrides.
|
||||||
callPackage = path: args: let
|
callPackage = path: args: let
|
||||||
override = pkgs.callPackage path args;
|
override = super.callPackage path args;
|
||||||
upstream = optionalAttrs (override ? "name")
|
upstream = optionalAttrs (override ? "name")
|
||||||
(oldpkgs.${(parseDrvName override.name).name} or {});
|
(super.${(parseDrvName override.name).name} or {});
|
||||||
in if upstream ? "name" &&
|
in if upstream ? "name" &&
|
||||||
override ? "name" &&
|
override ? "name" &&
|
||||||
compareVersions upstream.name override.name != -1
|
compareVersions upstream.name override.name != -1
|
||||||
then trace "Upstream `${upstream.name}' gets overridden by `${override.name}'." override
|
then
|
||||||
else override;
|
trace
|
||||||
|
"Upstream `${upstream.name}' gets overridden by `${override.name}'."
|
||||||
|
override
|
||||||
|
else override;
|
||||||
|
|
||||||
in {}
|
in {
|
||||||
// mapAttrs (_: flip callPackage {})
|
|
||||||
(filterAttrs (_: dir: pathExists (dir + "/default.nix"))
|
|
||||||
(subdirsOf ./.))
|
|
||||||
// {
|
|
||||||
alsa-hdspconf = callPackage ./alsa-tools { alsaToolTarget="hdspconf";};
|
alsa-hdspconf = callPackage ./alsa-tools { alsaToolTarget="hdspconf";};
|
||||||
alsa-hdspmixer = callPackage ./alsa-tools { alsaToolTarget="hdspmixer";};
|
alsa-hdspmixer = callPackage ./alsa-tools { alsaToolTarget="hdspmixer";};
|
||||||
alsa-hdsploader = callPackage ./alsa-tools { alsaToolTarget="hdsploader";};
|
alsa-hdsploader = callPackage ./alsa-tools { alsaToolTarget="hdsploader";};
|
||||||
@ -31,5 +27,9 @@ with import <stockholm/lib>;
|
|||||||
sha256 = "18ddzyh11bywrhzdkzvrl7nvgp5gdb4k1s0zxbz2bkhd14vi72bb";
|
sha256 = "18ddzyh11bywrhzdkzvrl7nvgp5gdb4k1s0zxbz2bkhd14vi72bb";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// mapAttrs (_: flip callPackage {})
|
||||||
|
(filterAttrs (_: dir: pathExists (dir + "/default.nix"))
|
||||||
|
(subdirsOf ./.))
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
_:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../krebs
|
../krebs
|
||||||
./2configs
|
./2configs
|
||||||
./3modules
|
./3modules
|
||||||
./5pkgs
|
|
||||||
];
|
];
|
||||||
|
nixpkgs.config.packageOverrides = import ./5pkgs pkgs;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user