Skip to content

Commit

Permalink
move dune-static overlay to overlays
Browse files Browse the repository at this point in the history
  • Loading branch information
asymmetric committed Dec 11, 2024
1 parent 9b0f35a commit 84e71b7
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,9 @@
})
self.overlays.default
];
dune-static-overlay = self: super: {
ocamlPackages = super.ocaml-ng.ocamlPackages_5_1.overrideScope (oself: osuper: {
dune_3 = osuper.dune_3.overrideAttrs (a: {
src = ./.;
preBuild = "ocaml boot/bootstrap.ml --static";
});
});
};
pkgs-static = nixpkgs.legacyPackages.${system}.appendOverlays [
ocaml-overlays.overlays.default
dune-static-overlay
self.overlays.dune-static
];

add-experimental-configure-flags = pkg: pkg.overrideAttrs {
Expand Down Expand Up @@ -267,21 +259,31 @@
};
};
}) // {
overlays.default = self: super: {
dune = with self; stdenv.mkDerivation {
pname = "dune";
version = "n/a";
src = ./.;
nativeBuildInputs = with ocamlPackages; [ ocaml findlib ];
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.CoreServices
];
strictDeps = true;
buildFlags = [ "release" ];
dontAddPrefix = true;
dontAddStaticConfigureFlags = true;
configurePlatforms = [ ];
installFlags = [ "PREFIX=${placeholder "out"}" "LIBDIR=$(OCAMLFIND_DESTDIR)" ];
overlays = {
default = self: super: {
dune = with self; stdenv.mkDerivation {
pname = "dune";
version = "n/a";
src = ./.;
nativeBuildInputs = with ocamlPackages; [ ocaml findlib ];
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.CoreServices
];
strictDeps = true;
buildFlags = [ "release" ];
dontAddPrefix = true;
dontAddStaticConfigureFlags = true;
configurePlatforms = [ ];
installFlags = [ "PREFIX=${placeholder "out"}" "LIBDIR=$(OCAMLFIND_DESTDIR)" ];
};
};
dune-static = self: super: {
ocamlPackages = super.ocaml-ng.ocamlPackages_5_1.overrideScope (oself: osuper: {
dune_3 = osuper.dune_3.overrideAttrs (a: {
src = ./.;
preBuild = "ocaml boot/bootstrap.ml --static";
});
});
};
};
};
Expand Down

0 comments on commit 84e71b7

Please sign in to comment.