infrastructure/bootstrap.nix
Tom Hubrecht 8f8585038d feat(bootstrap): Add the root of the repository
This avoids making ../../.. in some places
2025-04-16 07:48:57 +02:00

35 lines
786 B
Nix

# SPDX-FileCopyrightText: 2024 Ryan Lahfa <ryan.lahfa@dgnum.eu>
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
# SPDX-FileContributor: Maurice Debray <maurice.debray@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
let
unpatchedSources = import ./npins;
pkgs = import unpatchedSources.nixos-unstable { overlays = [ ]; };
patch = (import ./lib/nix-patches { patchFile = ./patches; }).base {
inherit pkgs;
};
sources = builtins.mapAttrs (
k: src:
patch.applyPatches {
inherit src;
name = k;
}
) unpatchedSources;
overlays.lib = _: lib: { extra = import ./lib/nix-lib { inherit lib; }; };
in
{
inherit overlays sources unpatchedSources;
root = ./.;
pkgs = pkgs // {
lib = pkgs.lib.extend overlays.lib;
};
}