Workaround the broken symbols in libcxx on darwin.

We use a specific patched commit in nixpkgs until the permanent fix is merged.
This commit is contained in:
Jeremy Wall 2024-01-29 16:29:10 -05:00
parent 8f0c152c53
commit 6de5297111
3 changed files with 25 additions and 6 deletions

View File

@ -1,5 +1,2 @@
build-darwin: nix/base-system/*
darwin-rebuild --flake ./nix/base-system build
qpply-darwin: nix/base-system/*
darwin-rebuild --flake ./nix/base-system switch
%-darwin:
darwin-rebuild --flake ./nix/base-system $*

View File

@ -555,6 +555,22 @@
"type": "github"
}
},
"patchedLibcxx": {
"locked": {
"lastModified": 1705990968,
"narHash": "sha256-MYonu7rb4/U++uQtORQqIMc3DX6M1PI1GETAt2br5Vo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1c4b0767f4ef0d277c7352eae00337c0a379b69d",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1c4b0767f4ef0d277c7352eae00337c0a379b69d",
"type": "github"
}
},
"root": {
"inputs": {
"agenix-flake": "agenix-flake",
@ -567,6 +583,7 @@
"nixpkgs": "nixpkgs_5",
"nixpkgs-darwin": "nixpkgs-darwin",
"nurl-flake": "nurl-flake",
"patchedLibcxx": "patchedLibcxx",
"roslyn-lsp": "roslyn-lsp",
"runwhen-flake": "runwhen-flake",
"rust-overlay-flake": "rust-overlay-flake",

View File

@ -3,6 +3,7 @@
# Default to sane nixpkgs versions
nixpkgs.url = "github:nixos/nixpkgs/23.11";
unstable.url = "nixpkgs";
patchedLibcxx.url = "github:nixos/nixpkgs?rev=1c4b0767f4ef0d277c7352eae00337c0a379b69d";
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-23.11-darwin";
darwin = {
url = "github:lnl7/nix-darwin";
@ -57,6 +58,7 @@
treesitter-context,
roslyn-lsp,
unstable,
patchedLibcxx,
... # We don't use the self or nixpkgs args here so we just glob it.
}:
rec {
@ -131,6 +133,7 @@ EOF";
vimagit
hoon-vim
nvim-treesitter
lean-nvim
roslyn-nvim
nvim-treesitter-context
nvim-treesitter-textobjects
@ -198,6 +201,7 @@ EOF";
age = agenix-flake.packages."${system}".default;
nurl = nurl-flake.packages."${system}".default;
unstablePkgs = import unstable { inherit system; };
patchedLibcxxPkgs = import patchedLibcxx { inherit system; };
in { config, pkgs, ... }: let
d2-lang = pkgs.callPackage ./d2.nix {};
in {
@ -237,7 +241,8 @@ EOF";
environment.systemPackages = (with pkgs; [
# TODO(jwall): This appears to be broken due to: https://github.com/NixOS/nixpkgs/issues/166205
# Should be fixed by: https://github.com/NixOS/nixpkgs/pull/282624
#unstablePkgs.isabelle
patchedLibcxxPkgs.isabelle
patchedLibcxxPkgs.lean4
terraform # TODO(jeremy): Replace with opentofu when that is an option.
consul
consul-template