Closed mistzzt closed 8 months ago
I'll check it out. My suspicion is that the opam build might be broken on macOS in nixpkgs? I don't see any other reason for this to fail.
Looks like this is indeed the case, as nix build github:nixos/nixpkgs/ebbe1c1299faf63fffdf1e2a6ebfe43c56b2e691#opam
fails with the same error. Removing the overrides like this:
diff --git a/flake.nix b/flake.nix
index 9b8d389..ee98fb1 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,10 +2,11 @@
description = "minimal opam-nix example";
inputs = {
- nixpkgs.url = "github:NixOS/nixpkgs/release-23.11";
+# nixpkgs.url = "github:NixOS/nixpkgs/release-23.11";
+ nixpkgs.follows = "opam-nix/nixpkgs";
opam-nix = {
url = "github:tweag/opam-nix";
- inputs.nixpkgs.follows = "nixpkgs";
+# inputs.nixpkgs.follows = "nixpkgs";
};
};
Results in a different error
... And that error should be fixed in 0f771d647c0dd2b2880533646e8d86a422895b17. Could you check?
It works great now. @balsoft Thank you!
Hi,
I configured a freshly initialized dune project (by
dune init proj
) with opam-nix. I can build it successfully in an arm NixOS VM, but I failed building it under an apple silicon mac (I tried both architectures, x86_64 and aarch64). I've uploaded the dune project and flake here: https://github.com/mistzzt/minimal-opam-nix-exampleAlso, below are the relevant error messages. I have no idea what to try next -- any suggestion would be appreciated.
Thanks!