I’m trying to write a nix flake that produces a shell to compile a tex project from two different systems: One linux x86_64 and one MacOs aarch64-darwin.
I’m quite new to nix and flakes, so I took the example flake given on the nixos wiki “Super fast nix-shell”. It works well on linux x86 but nix develop fails on MacOs and I can’t figure out where is the problem.
Here is my flake.nix:
{
description = "Build Shell with any dependency of the project";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:NixOs/nixpkgs";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let pkgs = nixpkgs.legacyPackages.${system};
tex = pkgs.texlive.combine
{
inherit (pkgs.texlive)
scheme-medium
pgf
standalone
minted
tcolorbox
environ
tabto-ltx
circuitikz
lastpage
tabularray
pygmentex
ninecolors
multirow;
};
in
{
devShells.default = pkgs.mkShell {
nativeBuildInputs = [ pkgs.python310Packages.pygments tex ];
};
}
);
}
When using the nix develop
command from my mac, I get the following error:
error: flake 'git+file:///PATH_TO_FLAKE' does not provide attribute 'devShells.aarch64-darwin.devShell.aarch64-darwin', 'packages.aarch64-darwin.devShell.aarch64-darwin', 'legacyPackages.aarch64-darwin.devShell.aarch64-darwin', 'devShell.aarch64-darwin' or 'defaultPackage.aarch64-darwin'
I have no clue about the source of this error, any idea ?