From 7fa2d606b510303bde1919bc89954bfd4ec15a1b Mon Sep 17 00:00:00 2001 From: Travis Staton Date: Mon, 4 Dec 2023 11:05:02 -0500 Subject: [PATCH 1/3] provide some deps for the nix linker --- flake.nix | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 1a749b4e06..de04c557f5 100644 --- a/flake.nix +++ b/flake.nix @@ -67,13 +67,25 @@ nixpkgs-devShells = { only-tools-nixpkgs = unstable.mkShellNoCC { name = "only-tools-nixpkgs"; - buildInputs = with nixpkgs-packages; [ - ghc - ormolu - hls - stack - hpack - ]; + buildInputs = + let + build-tools = with nixpkgs-packages; [ + ghc + ormolu + hls + stack + hpack + ]; + native-packages = pkgs.lib.optionals pkgs.stdenv.isDarwin + (with pkgs.darwin.apple_sdk.frameworks; + [ Cocoa ]); + c-deps = with pkgs; + [ pkg-config zlib glibcLocales ]; + in + build-tools ++ c-deps ++ native-packages; + shellHook = '' + export LD_LIBRARY_PATH=${pkgs.zlib}/lib:$LD_LIBRARY_PATH + ''; }; }; in From 2986f3f7b273c4a2e2c678e3548f6e4c5f9f724c Mon Sep 17 00:00:00 2001 From: Travis Staton Date: Mon, 4 Dec 2023 11:45:24 -0500 Subject: [PATCH 2/3] withcc --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index de04c557f5..eeaee9cf9e 100644 --- a/flake.nix +++ b/flake.nix @@ -65,7 +65,7 @@ hpack = unstable.hpack; }; nixpkgs-devShells = { - only-tools-nixpkgs = unstable.mkShellNoCC { + only-tools-nixpkgs = unstable.mkShell { name = "only-tools-nixpkgs"; buildInputs = let From 1c02536cf9206b1f0794af55b41e93047c54e32a Mon Sep 17 00:00:00 2001 From: Travis Staton Date: Mon, 4 Dec 2023 11:53:26 -0500 Subject: [PATCH 3/3] update macsdk version --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index eeaee9cf9e..5f45e19548 100644 --- a/flake.nix +++ b/flake.nix @@ -77,9 +77,9 @@ hpack ]; native-packages = pkgs.lib.optionals pkgs.stdenv.isDarwin - (with pkgs.darwin.apple_sdk.frameworks; + (with unstable.darwin.apple_sdk.frameworks; [ Cocoa ]); - c-deps = with pkgs; + c-deps = with unstable; [ pkg-config zlib glibcLocales ]; in build-tools ++ c-deps ++ native-packages;