Created
April 17, 2023 00:10
-
-
Save pete-murphy/d66ba0963cf7e7802541632ba44b7f79 to your computer and use it in GitHub Desktop.
zbg nix flake debugging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs = { | |
flake-utils.url = "github:numtide/flake-utils"; | |
# nixpkgs.follows = "opam-nix/nixpkgs"; | |
nixpkgs.url = "github:NixOS/nixpkgs/master"; | |
# nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; | |
# opam-nix = { | |
# url = "github:tweag/opam-nix"; | |
# inputs.nixpkgs.follows = "nixpkgs"; | |
# }; | |
}; | |
outputs = { self, flake-utils, opam-nix, nixpkgs }@inputs: | |
# Don't forget to put the package name instead of `throw': | |
let package = "zbg"; | |
in flake-utils.lib.eachDefaultSystem (system: | |
let | |
pkgs = nixpkgs.legacyPackages.${system}; | |
on = opam-nix.lib.${system}; | |
scope = | |
on.buildDuneProject { } package ./. { ocaml-base-compiler = "*"; }; | |
overlay = final: prev: | |
{ | |
# dune = prev.dune.overrideAttrs (_: { nativeBuildInputs = with pkgs; [dune_3]; }); | |
# Your overrides go here | |
}; | |
in { | |
legacyPackages = scope.overrideScope' overlay; | |
packages.default = self.legacyPackages.${system}.${package}; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment