From 817a35be0bfcb9d29146ef89a2d927a315c67f3e Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Wed, 31 Aug 2022 12:36:48 +0100 Subject: [PATCH] deno: allow for the build of libtcc.a on darwin While the rest of the build is broken libtcc.a actually builds fine on darwin systems and deno_ffi can link to it and work perfectly fine --- pkgs/development/web/deno/default.nix | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/pkgs/development/web/deno/default.nix b/pkgs/development/web/deno/default.nix index eedf747c21ff..a28b0dba4b62 100644 --- a/pkgs/development/web/deno/default.nix +++ b/pkgs/development/web/deno/default.nix @@ -15,18 +15,6 @@ , librusty_v8 ? callPackage ./librusty_v8.nix { } }: -let - libtcc = tinycc.overrideAttrs (oa: { - makeFlags = [ "libtcc.a" ]; - # tests want tcc binary - doCheck = false; - outputs = [ "out" ]; - installPhase = '' - mkdir -p $out/lib/ - mv libtcc.a $out/lib/ - ''; - }); -in rustPlatform.buildRustPackage rec { pname = "deno"; version = "1.25.1"; @@ -58,6 +46,19 @@ rustPlatform.buildRustPackage rec { # The deno_ffi package currently needs libtcc.a on linux and macos and will try to compile it at build time # To avoid this we point it to our copy (dir) # In the future tinycc will be replaced with asm + libtcc = tinycc.overrideAttrs (oa: { + makeFlags = [ "libtcc.a" ]; + # tests want tcc binary + doCheck = false; + outputs = [ "out" ]; + installPhase = '' + mkdir -p $out/lib/ + mv libtcc.a $out/lib/ + ''; + # building the whole of tcc on darwin is broken in nixpkgs + # but just building libtcc.a works fine so mark this as unbroken + meta.broken = false; + }); TCC_PATH = "${libtcc}/lib"; # Tests have some inconsistencies between runs with output integration tests @@ -101,6 +102,5 @@ rustPlatform.buildRustPackage rec { license = licenses.mit; maintainers = with maintainers; [ jk ]; platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; - broken = stdenv.isDarwin; # currently fail to build tinycc on darwin in nixpkgs }; }