l 5: get rid of <stockholm>
This commit is contained in:
parent
42e91b3191
commit
b501b81041
@ -1,24 +1,24 @@
|
|||||||
with import <stockholm/lib>;
|
|
||||||
self: super: let
|
self: super: let
|
||||||
|
lib = super.lib;
|
||||||
|
|
||||||
# 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 = super.callPackage path args;
|
override = super.callPackage path args;
|
||||||
upstream = optionalAttrs (override ? "name")
|
upstream = lib.optionalAttrs (override ? "name")
|
||||||
(super.${(parseDrvName override.name).name} or {});
|
(super.${(builtins.parseDrvName override.name).name} or {});
|
||||||
in if upstream ? "name" &&
|
in if upstream ? "name" &&
|
||||||
override ? "name" &&
|
override ? "name" &&
|
||||||
compareVersions upstream.name override.name != -1
|
lib.compareVersions upstream.name override.name != -1
|
||||||
then
|
then
|
||||||
trace
|
builtins.trace
|
||||||
"Upstream `${upstream.name}' gets overridden by `${override.name}'."
|
"Upstream `${upstream.name}' gets overridden by `${override.name}'."
|
||||||
override
|
override
|
||||||
else override;
|
else override;
|
||||||
|
|
||||||
subdirsOf = path:
|
subdirsOf = path:
|
||||||
mapAttrs (name: _: path + "/${name}")
|
lib.mapAttrs (name: _: path + "/${name}")
|
||||||
(filterAttrs (_: eq "directory") (readDir path));
|
(lib.filterAttrs (_: x: x == "directory") (builtins.readDir path));
|
||||||
|
|
||||||
in mapAttrs (_: flip callPackage {})
|
in lib.mapAttrs (_: lib.flip callPackage {})
|
||||||
(filterAttrs (_: dir: pathExists (dir + "/default.nix"))
|
(lib.filterAttrs (_: dir: lib.pathExists (dir + "/default.nix"))
|
||||||
(subdirsOf ./.))
|
(subdirsOf ./.))
|
||||||
|
Loading…
Reference in New Issue
Block a user