diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2022-09-07 18:35:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-07 18:35:19 +0200 |
commit | 759945155af28e275d370c3dfba1e3a695513350 (patch) | |
tree | 7d4647d58717dae810b7ac5c31cd76de8d03b826 /pkgs/development/compilers/tinycc/default.nix | |
parent | 7837fafa9500952ab4ead9e371f7e3f01cfca502 (diff) | |
parent | 817a35be0bfcb9d29146ef89a2d927a315c67f3e (diff) |
Merge pull request #182311 from 06kellyjac/deno
Diffstat (limited to 'pkgs/development/compilers/tinycc/default.nix')
-rw-r--r-- | pkgs/development/compilers/tinycc/default.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/development/compilers/tinycc/default.nix b/pkgs/development/compilers/tinycc/default.nix index 97a86a3fa783..21eb497a116a 100644 --- a/pkgs/development/compilers/tinycc/default.nix +++ b/pkgs/development/compilers/tinycc/default.nix @@ -8,6 +8,10 @@ , which }: +let + # avoid "malformed 32-bit x.y.z" error on mac when using clang + isCleanVer = version: builtins.match "^[0-9]\\.+[0-9]+\\.[0-9]+" version != null; +in stdenv.mkDerivation rec { pname = "tcc"; version = "unstable-2022-07-15"; @@ -62,7 +66,11 @@ stdenv.mkDerivation rec { ]; preConfigure = '' - echo ${version} > VERSION + ${ + if stdenv.isDarwin && ! isCleanVer version + then "echo 'not overwriting VERSION since it would upset ld'" + else "echo ${version} > VERSION" + } configureFlagsArray+=("--elfinterp=$(< $NIX_CC/nix-support/dynamic-linker)") ''; |