crystal: fixes for darwin
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
{ stdenv, lib, fetchFromGitHub, fetchurl, makeWrapper
|
{ stdenv, lib, fetchFromGitHub, fetchurl, makeWrapper
|
||||||
, coreutils, git, gmp, nettools, openssl, readline, tzdata, libxml2, libyaml
|
, coreutils, git, gmp, hostname, openssl, readline, tzdata, libxml2, libyaml
|
||||||
, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm, clang, which, zlib, pkgconfig
|
, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm, clang, which, zlib, pkgconfig
|
||||||
, callPackage }:
|
, callPackage }:
|
||||||
|
|
||||||
@@ -62,9 +62,12 @@ let
|
|||||||
substituteInPlace src/crystal/system/unix/time.cr \
|
substituteInPlace src/crystal/system/unix/time.cr \
|
||||||
--replace /usr/share/zoneinfo ${tzdata}/share/zoneinfo
|
--replace /usr/share/zoneinfo ${tzdata}/share/zoneinfo
|
||||||
|
|
||||||
ln -s spec/compiler spec/std
|
ln -sf spec/compiler spec/std
|
||||||
|
|
||||||
|
# Dirty fix for when no sandboxing is enabled
|
||||||
|
rm -rf /tmp/crystal
|
||||||
|
mkdir -p /tmp/crystal
|
||||||
|
|
||||||
mkdir /tmp/crystal
|
|
||||||
substituteInPlace spec/std/file_spec.cr \
|
substituteInPlace spec/std/file_spec.cr \
|
||||||
--replace '/bin/ls' '${coreutils}/bin/ls' \
|
--replace '/bin/ls' '${coreutils}/bin/ls' \
|
||||||
--replace '/usr/share' '/tmp/crystal' \
|
--replace '/usr/share' '/tmp/crystal' \
|
||||||
@@ -81,7 +84,7 @@ let
|
|||||||
--replace '{% if flag?(:gnu) %}"listen: "{% else %}"bind: "{% end %}' '"bind: "'
|
--replace '{% if flag?(:gnu) %}"listen: "{% else %}"bind: "{% end %}' '"bind: "'
|
||||||
|
|
||||||
substituteInPlace spec/std/system_spec.cr \
|
substituteInPlace spec/std/system_spec.cr \
|
||||||
--replace '`hostname`' '`${nettools}/bin/hostname`'
|
--replace '`hostname`' '`${hostname}/bin/hostname`'
|
||||||
|
|
||||||
# See https://github.com/crystal-lang/crystal/pull/8640
|
# See https://github.com/crystal-lang/crystal/pull/8640
|
||||||
substituteInPlace spec/std/http/cookie_spec.cr \
|
substituteInPlace spec/std/http/cookie_spec.cr \
|
||||||
|
|||||||
Reference in New Issue
Block a user