use plain nixpkgs input to allow flake consumer overriding

This commit is contained in:
atagen 2024-12-12 12:28:19 +11:00
parent f345ab24d4
commit adf6bed32a
2 changed files with 36 additions and 17 deletions

View file

@ -1,6 +1,7 @@
{
inputs = {
nixpkgs-oc.url = "github:nix-ocaml/nix-overlays";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
ocaml-overlay.url = "github:nix-ocaml/nix-overlays";
flake-utils.url = "github:numtide/flake-utils";
};
@ -11,17 +12,18 @@
outputs = {
self,
nixpkgs-oc,
nixpkgs,
ocaml-overlay,
flake-utils,
}: let
version = builtins.toString self.lastModified;
in
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs-oc.legacyPackages.${system};
# import nixpkgs {
# inherit system;
# };
pkgs = import nixpkgs {
inherit system;
overlays = [ocaml-overlay.overlays.default];
};
inherit (pkgs) mkShell ocamlPackages;
inherit
(ocamlPackages)
@ -104,7 +106,7 @@
}
)
// {
nixosModules.culr = import ./nix/module.nix {overlays = [nixpkgs-oc.overlays.default self.overlays.culr];};
nixosModules.culr = import ./nix/module.nix {overlays = [ocaml-overlay.overlays.default self.overlays.culr];};
overlays.culr = final: prev: let
ocaml-deps = let