Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 164 additions & 5 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,35 @@
inputs.devshell.inputs.nixpkgs.follows = "nixpkgs";
inputs.devshell.url = "github:numtide/devshell";

inputs.nix-filter.url = "github:numtide/nix-filter/3e1fff9";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems nix-filter is not used anywhere?


# FixMe(maint/upstream): merge this branch upstream
#inputs.opam-nix.url = "github:tweag/opam-nix";
inputs.opam-nix.url = "github:ju1m/opam-nix/materialize-monorepo";
Copy link
Copy Markdown
Contributor

@jian-lin jian-lin Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I have been thinking about removing opam-nix for a long time. Just checked the missing ocaml deps and turns out there are only 8. Sounds promising!

The motivation of doing so is that

  • we can upstream dnsvizor to Nixpkgs
  • we can remove the logic of opam-nix and its generated big json files

inputs.opam-nix.inputs.nixpkgs.follows = "nixpkgs";
inputs.opam-nix.inputs.flake-utils.follows = "flake-utils";
inputs.opam-nix.inputs.opam2json.follows = "opam2json";
inputs.opam-nix.inputs.opam-repository.follows = "opam-repository";
inputs.opam-nix.inputs.opam-overlays.follows = "opam-overlays";
inputs.opam-nix.inputs.mirage-opam-overlays.follows = "mirage-opam-overlays";

inputs.opam2json.url = "github:tweag/opam2json";
inputs.opam2json.inputs.nixpkgs.follows = "nixpkgs";

# update ocaml-related overlays to use new-enough ocaml packages
inputs.opam-repository = {
url = "github:ocaml/opam-repository";
flake = false;
};
inputs.opam-overlays = {
url = "github:dune-universe/opam-overlays";
flake = false;
};
inputs.mirage-opam-overlays = {
url = "github:dune-universe/mirage-opam-overlays";
flake = false;
};

# See <https://github.com/ngi-nix/ngipkgs/issues/24> for plans to support Darwin.
inputs.systems.url = "github:nix-systems/default-linux";

Expand Down
9 changes: 8 additions & 1 deletion pkgs/by-name/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
pkgs,
dream2nix,
sources,
system,
}:
let
inherit (builtins)
Expand Down Expand Up @@ -56,7 +57,13 @@ let
in
evaluated.config.public;

callPackage = pkgs.newScope (self // { inherit callPackage; });
callPackage = pkgs.newScope (
self
// {
inherit callPackage;
opam-nix = sources.opam-nix.lib.${system};
}
);

mkSbtDerivation =
x:
Expand Down
Loading