mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-12-01 18:16:14 +02:00
flake.nix: Make a MinGW dev shell
This requires a `shellCrossSystems` for now, since Nix doesn't actually build on Windows. This can be dropped once it does.
This commit is contained in:
parent
46b98a40a7
commit
b892161e31
1 changed files with 9 additions and 2 deletions
11
flake.nix
11
flake.nix
|
@ -42,6 +42,13 @@
|
||||||
"x86_64-unknown-netbsd"
|
"x86_64-unknown-netbsd"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Nix doesn't yet build on this platform, so we put it in a
|
||||||
|
# separate list. We just use this for `devShells` and
|
||||||
|
# `nixpkgsFor`, which this depends on.
|
||||||
|
shellCrossSystems = crossSystems ++ [
|
||||||
|
"x86_64-w64-mingw32"
|
||||||
|
];
|
||||||
|
|
||||||
stdenvs = [ "gccStdenv" "clangStdenv" "clang11Stdenv" "stdenv" "libcxxStdenv" "ccacheStdenv" ];
|
stdenvs = [ "gccStdenv" "clangStdenv" "clang11Stdenv" "stdenv" "libcxxStdenv" "ccacheStdenv" ];
|
||||||
|
|
||||||
forAllSystems = lib.genAttrs systems;
|
forAllSystems = lib.genAttrs systems;
|
||||||
|
@ -129,7 +136,7 @@
|
||||||
in {
|
in {
|
||||||
inherit stdenvs native;
|
inherit stdenvs native;
|
||||||
static = native.pkgsStatic;
|
static = native.pkgsStatic;
|
||||||
cross = forAllCrossSystems (crossSystem: make-pkgs crossSystem "stdenv");
|
cross = lib.genAttrs shellCrossSystems (crossSystem: make-pkgs crossSystem "stdenv");
|
||||||
});
|
});
|
||||||
|
|
||||||
commonDeps =
|
commonDeps =
|
||||||
|
@ -808,7 +815,7 @@
|
||||||
in
|
in
|
||||||
(makeShells "native" nixpkgsFor.${system}.native) //
|
(makeShells "native" nixpkgsFor.${system}.native) //
|
||||||
(makeShells "static" nixpkgsFor.${system}.static) //
|
(makeShells "static" nixpkgsFor.${system}.static) //
|
||||||
(forAllCrossSystems (crossSystem: let pkgs = nixpkgsFor.${system}.cross.${crossSystem}; in makeShell pkgs pkgs.stdenv)) //
|
(lib.genAttrs shellCrossSystems (crossSystem: let pkgs = nixpkgsFor.${system}.cross.${crossSystem}; in makeShell pkgs pkgs.stdenv)) //
|
||||||
{
|
{
|
||||||
default = self.devShells.${system}.native-stdenvPackages;
|
default = self.devShells.${system}.native-stdenvPackages;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue