use nixpkgs input and ocaml overlay

This commit is contained in:
atagen 2024-12-12 12:31:04 +11:00 committed by atagen
parent 4490c67de9
commit 4bc3176ce6
2 changed files with 45 additions and 25 deletions

53
flake.lock generated
View File

@ -73,7 +73,7 @@
"lix"
],
"nixpkgs": [
"nixpkgs-oc"
"ocaml-overlay"
]
},
"locked": {
@ -122,37 +122,53 @@
"type": "github"
}
},
"nixpkgs-oc": {
"inputs": {
"nixpkgs": "nixpkgs_2"
},
"nixpkgs_2": {
"locked": {
"lastModified": 1733437725,
"narHash": "sha256-ridu0NcO4Dr2TsHqPE+kh58xTHcXg7IHq/FF74KrP/g=",
"owner": "nix-ocaml",
"repo": "nix-overlays",
"rev": "03b85ffd6c37255829d475f3584f8d8a1556d5f2",
"lastModified": 1733749988,
"narHash": "sha256-+5qdtgXceqhK5ZR1YbP1fAUsweBIrhL38726oIEAtDs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "bc27f0fde01ce4e1bfec1ab122d72b7380278e68",
"type": "github"
},
"original": {
"owner": "nix-ocaml",
"repo": "nix-overlays",
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"nixpkgs_3": {
"locked": {
"lastModified": 1733380312,
"narHash": "sha256-ywntxT10Om755wkB9tYgJwEwELQZKYAO5WcNuHv1vjI=",
"lastModified": 1733838633,
"narHash": "sha256-51x/FRiqMGQMyP+aSTp5b36WxsvT7q9KYtW2f+7+HoI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a772498086eac57d97065a980a21fc0f304e3192",
"rev": "cdb5bd9f4fe066d1726cd848ad5858eb36a2ca93",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a772498086eac57d97065a980a21fc0f304e3192",
"rev": "cdb5bd9f4fe066d1726cd848ad5858eb36a2ca93",
"type": "github"
}
},
"ocaml-overlay": {
"inputs": {
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1733872709,
"narHash": "sha256-CSjVHftyEGmkDeheoWDjQECIrgASNy8FNc0fqIFvcwM=",
"owner": "nix-ocaml",
"repo": "nix-overlays",
"rev": "8a82971570aafb4233340ef429ba672fd780b5ac",
"type": "github"
},
"original": {
"owner": "nix-ocaml",
"repo": "nix-overlays",
"type": "github"
}
},
@ -162,7 +178,8 @@
"lix": "lix",
"lix-module": "lix-module",
"nh": "nh",
"nixpkgs-oc": "nixpkgs-oc"
"nixpkgs": "nixpkgs_2",
"ocaml-overlay": "ocaml-overlay"
}
},
"systems": {

View File

@ -1,6 +1,8 @@
{
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";
@ -13,7 +15,7 @@
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
inputs.nixpkgs.follows = "nixpkgs-oc";
inputs.nixpkgs.follows = "ocaml-overlay";
inputs.lix.follows = "lix";
};
};
@ -25,11 +27,12 @@
outputs = inputs @ {
self,
nixpkgs-oc,
nixpkgs,
ocaml-overlay,
flake-utils,
...
}: let
inherit (inputs) nixpkgs-oc;
inherit (inputs) ocaml-overlay;
lix-overlay = inputs.lix-module.overlays.default;
lix-module = inputs.lix-module.nixosModules.default;
nh-overlay = inputs.nh.overlays.default;
@ -37,12 +40,12 @@
in
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs-oc {
pkgs = import nixpkgs {
inherit system;
overlays = [
lix-overlay
nh-overlay
nixpkgs-oc.overlays.default
ocaml-overlay.overlays.default
];
modules = [lix-module];
extra-substituters = "https://anmonteiro.nix-cache.workers.dev";
@ -114,7 +117,7 @@
// {
nixosModules.meat = import ./nix/module.nix {
meatOverlays = [
nixpkgs-oc.overlays.default
ocaml-overlay.overlays.default
nh-overlay
self.overlays.meat
];