mio-ops/nix/default.nix

23 lines
599 B
Nix
Raw Normal View History

2021-11-16 04:57:23 +00:00
{ sources ? import ./sources.nix, system ? builtins.currentSystem
, crossSystem ? null, config ? { } }:
2020-05-13 05:08:41 +00:00
let
# our own overlays:
2021-11-16 04:57:23 +00:00
local-overlays = [ ];
2020-05-13 05:08:41 +00:00
2021-11-16 04:57:23 +00:00
globals = if builtins.pathExists ../globals.nix then
[ (import ../globals.nix) ]
else
builtins.trace "globals.nix missing, please add symlink" [ ];
2020-05-13 05:08:41 +00:00
# merge upstream sources with our own:
upstream-overlays = [
2021-11-16 04:57:23 +00:00
(_: super: {
2020-05-13 05:08:41 +00:00
2021-11-16 04:57:23 +00:00
sources = (super.sources or { }) // sources;
2020-05-13 05:08:41 +00:00
})
];
2021-11-16 04:57:23 +00:00
overlays = local-overlays ++ globals ++ upstream-overlays;
in import sources.nixpkgs { inherit overlays system crossSystem config; }