Skip to content

Commit

Permalink
build: Exclude CC library in Nix shell for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Mar 12, 2024
1 parent 608bb8d commit c0aa00b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi

nix_direnv_watch_file flake.nix
nix_direnv_watch_file flake.lock
watch_file flake.nix
watch_file flake.lock
if ! use flake . --impure; then
echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
fi
4 changes: 3 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
forEachSystem
(system: let
pkgs = nixpkgs.legacyPackages.${system};
lib = pkgs.lib;
isDarwin = lib.strings.hasSuffix "darwin" system;
in {
default = devenv.lib.mkShell {
inherit inputs pkgs;
Expand All @@ -45,7 +47,7 @@
config,
...
}: {
packages = with pkgs; [pre-commit poethepoet jupyter stdenv.cc.cc.lib zlib];
packages = with pkgs; [pre-commit poethepoet jupyter zlib] ++ lib.optionals isDarwin [stdenv.cc.cc.lib];

env = {
QIBOLAB_PLATFORMS = (dirOf config.env.DEVENV_ROOT) + "/qibolab_platforms_qrc";
Expand Down

0 comments on commit c0aa00b

Please sign in to comment.