Skip to content

Commit

Permalink
x-compilation: update setup
Browse files Browse the repository at this point in the history
  • Loading branch information
anmonteiro committed Aug 30, 2023
1 parent bef441b commit 6b8f57e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 19 deletions.
44 changes: 31 additions & 13 deletions flake.lock

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

15 changes: 9 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
pkgs = nixpkgs.legacyPackages."${system}".extend (self: super: {
ocamlPackages = super.ocaml-ng.ocamlPackages_4_14;
});
native = pkgs.callPackage ./nix {
nix-filter = nix-filter.lib;
};

in
{
packages = {
native = pkgs.callPackage ./nix {
nix-filter = nix-filter.lib;
};
inherit native;
musl =
let
pkgs' = pkgs.pkgsCross.musl64;
Expand All @@ -30,12 +32,13 @@
let
pkgs' = pkgs.pkgsCross.aarch64-multiplatform-musl;
in
pkgs'.lib.callPackageWith pkgs' ./nix {
(pkgs'.lib.callPackageWith pkgs' ./nix {
static = true;
nix-filter = nix-filter.lib;
crossName = "aarch64";
};

}).overrideAttrs (o: {
OCAMLFIND_CONF = pkgs'.ocamlPackages.findlib.makeFindlibConf native o;
});
};
});
}

0 comments on commit 6b8f57e

Please sign in to comment.