From b43600693cbbef5319f0090594336f911f315201 Mon Sep 17 00:00:00 2001 From: Craige McWhirter Date: Wed, 13 May 2020 15:08:41 +1000 Subject: [PATCH] Initial commit --- nix/default.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 nix/default.nix diff --git a/nix/default.nix b/nix/default.nix new file mode 100644 index 0000000..c2e96f9 --- /dev/null +++ b/nix/default.nix @@ -0,0 +1,31 @@ +{ sourcePaths ? import ./sources.nix +, system ? builtins.currentSystem +, crossSystem ? null +, config ? {} }: + +let + # our own overlays: + local-overlays = [ + ]; + + globals = + if builtins.pathExists ../globals.nix + then [(import ../globals.nix)] + else builtins.trace "globals.nix missing, please add symlink" []; + + # merge upstream sources with our own: + upstream-overlays = [ + ( _: super: { + + sourcePaths = (super.sourcePaths or {}) // sourcePaths; + }) + ]; + + overlays = + local-overlays ++ + globals ++ + upstream-overlays; +in + import sourcePaths.nixpkgs { + inherit overlays system crossSystem config; + }