Skip to content

Commit

Permalink
devShells.x86_64-darwin: Remove unsupported non-native shells
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Feb 27, 2024
1 parent 6d25f92 commit 1fdd1c6
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -415,13 +415,22 @@
lib.mapAttrs'
(k: v: lib.nameValuePair "${prefix}-${k}" v)
(forAllStdenvs (stdenvName: makeShell pkgs pkgs.${stdenvName}));

hasCross =
# error: don't yet have a `targetPackages.darwin.LibsystemCross for x86_64-apple-darwin`
# see https://github.com/NixOS/nixpkgs/issues/180771
system != "x86_64-darwin";

nativeShells = makeShells "native" nixpkgsFor.${system}.native;
in
(makeShells "native" nixpkgsFor.${system}.native) //
(makeShells "static" nixpkgsFor.${system}.static) //
(lib.genAttrs shellCrossSystems (crossSystem: let pkgs = nixpkgsFor.${system}.cross.${crossSystem}; in makeShell pkgs pkgs.stdenv)) //
{
default = self.devShells.${system}.native-stdenvPackages;
default = nativeShells.native-stdenvPackages;
}
// nativeShells
// lib.optionalAttrs hasCross (
lib.genAttrs shellCrossSystems (crossSystem: let pkgs = nixpkgsFor.${system}.cross.${crossSystem}; in makeShell pkgs pkgs.stdenv)
// makeShells "static" nixpkgsFor.${system}.static
)
);
};
}

0 comments on commit 1fdd1c6

Please sign in to comment.