From 6f9e28c3eded55a4e11c07a86efdc8f75b54978a Mon Sep 17 00:00:00 2001 From: thomasjm Date: Thu, 15 Oct 2026 17:02:17 -0700 Subject: [PATCH] Add a gcroots output so GC doesn't take the toolchains --- flake.nix | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index e2a7d13..46cef13 100644 --- a/flake.nix +++ b/flake.nix @@ -105,20 +105,22 @@ testExe = flake.packages."cpp-notebook-language-server:test:cpp-notebook-language-server-test"; + devShellInputs = with pkgs; [ + stack + haskell.compiler.ghc9124 + + pcre + zlib + + cling-parser + ]; + in { devShells = { default = pkgs.mkShell { NIX_PATH = "nixpkgs=${pkgs.path}"; - buildInputs = with pkgs; [ - stack - haskell.compiler.ghc9124 - - pcre - zlib - - cling-parser - ]; + buildInputs = devShellInputs; }; }; @@ -176,6 +178,15 @@ exit 0 ''; + gcroots = pkgs.writeText "cpp-notebook-language-server-gc-roots" '' + ${pkgs.symlinkJoin { + name = "cpp-notebook-language-server-deps"; + paths = dynamic.buildInputs ++ dynamic.nativeBuildInputs + ++ static.buildInputs ++ static.nativeBuildInputs + ++ devShellInputs; + }} + ''; + nixpkgsPath = pkgs.writeShellScriptBin "nixpkgsPath.sh" "echo -n ${pkgs.path}"; });