Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 9e1f35a

Browse files
Merge pull request #1019 from DanGould/darwin-flake
Add firefox only on non-darwin systems' flake.nix
2 parents 8635a1f + cd3f007 commit 9e1f35a

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

flake.nix

+9-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
pkgs = import nixpkgs { inherit system overlays; };
1818
rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
1919
inputs = [
20-
rust
20+
rust
2121
pkgs.rust-analyzer
2222
pkgs.openssl
2323
pkgs.zlib
@@ -27,12 +27,15 @@
2727
pkgs.wasm-pack
2828
pkgs.wasm-bindgen-cli
2929
pkgs.binaryen
30-
pkgs.clang
30+
pkgs.clang
3131
pkgs.corepack_20
3232
pkgs.nodejs_20
33+
] ++ pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [
34+
# Add firefox deps only on non-darwin.
35+
# darwin is listed in badPlatforms in pkgs.firefox's meta.
3336
pkgs.firefox
3437
pkgs.geckodriver
35-
];
38+
];
3639
in
3740
{
3841
defaultPackage = pkgs.rustPlatform.buildRustPackage {
@@ -47,14 +50,14 @@
4750

4851

4952
devShell = pkgs.mkShell {
50-
packages = inputs;
53+
packages = inputs;
5154
shellHook = ''
52-
export LIBCLANG_PATH=${pkgs.libclang.lib}/lib/
55+
export LIBCLANG_PATH=${pkgs.libclang.lib}/lib/
5356
export LD_LIBRARY_PATH=${pkgs.openssl}/lib:$LD_LIBRARY_PATH
5457
export CC_wasm32_unknown_unknown=${pkgs.llvmPackages_14.clang-unwrapped}/bin/clang-14
5558
export CFLAGS_wasm32_unknown_unknown="-I ${pkgs.llvmPackages_14.libclang.lib}/lib/clang/14.0.6/include/"
5659
'';
57-
};
60+
};
5861
}
5962
);
6063
}

0 commit comments

Comments
 (0)