mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-06 21:42:35 +03:00
Merge pull request #258113 from viraptor/justbuild-darwin-partial
justbuild: partial fixes for darwin
This commit is contained in:
commit
f179420e7f
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
stdenv,
|
gccStdenv,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
fetchurl,
|
fetchurl,
|
||||||
|
|
||||||
@ -23,6 +23,8 @@
|
|||||||
curl,
|
curl,
|
||||||
libarchive,
|
libarchive,
|
||||||
}:
|
}:
|
||||||
|
let stdenv = gccStdenv;
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "justbuild";
|
pname = "justbuild";
|
||||||
version = "1.2.1";
|
version = "1.2.1";
|
||||||
@ -31,7 +33,14 @@ stdenv.mkDerivation rec {
|
|||||||
owner = "just-buildsystem";
|
owner = "just-buildsystem";
|
||||||
repo = "justbuild";
|
repo = "justbuild";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-5Fz/ID7xKbt6pq2B5/MOS6f2xUnKGvmNAYuPboPwKJY=";
|
sha256 = "sha256-36njngcGmRtYh/U3wkZUAU6ivPQ8qP8zVj1JzI9TuDY=";
|
||||||
|
|
||||||
|
# The source contains both test/end-to-end/targets and
|
||||||
|
# test/end-to-end/TARGETS, causing issues on case-insensitive filesystems.
|
||||||
|
# Remove them, since we're not running end-to-end tests.
|
||||||
|
postFetch = ''
|
||||||
|
rm -rf $out/test/end-to-end/targets $out/test/end-to-end/TARGETS
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
bazelapi = fetchurl {
|
bazelapi = fetchurl {
|
||||||
@ -91,6 +100,8 @@ stdenv.mkDerivation rec {
|
|||||||
mv etc/repos.json.patched etc/repos.json
|
mv etc/repos.json.patched etc/repos.json
|
||||||
jq '.unknown.PATH = []' etc/toolchain/CC/TARGETS > etc/toolchain/CC/TARGETS.patched
|
jq '.unknown.PATH = []' etc/toolchain/CC/TARGETS > etc/toolchain/CC/TARGETS.patched
|
||||||
mv etc/toolchain/CC/TARGETS.patched etc/toolchain/CC/TARGETS
|
mv etc/toolchain/CC/TARGETS.patched etc/toolchain/CC/TARGETS
|
||||||
|
'' + lib.optionalString stdenv.isDarwin ''
|
||||||
|
sed -ie 's|-Wl,-z,stack-size=8388608|-Wl,-stack_size,0x800000|' bin/bootstrap.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
/* The build phase follows the bootstrap procedure that is explained in
|
/* The build phase follows the bootstrap procedure that is explained in
|
||||||
@ -131,7 +142,7 @@ stdenv.mkDerivation rec {
|
|||||||
# Bootstrap just
|
# Bootstrap just
|
||||||
export PACKAGE=YES
|
export PACKAGE=YES
|
||||||
export NON_LOCAL_DEPS='[ "google_apis", "bazel_remote_apis" ]'
|
export NON_LOCAL_DEPS='[ "google_apis", "bazel_remote_apis" ]'
|
||||||
export JUST_BUILD_CONF=`echo $PATH | jq -R '{ ENV: { PATH: . }, "ADD_CFLAGS": ["-Wno-error=pedantic"], "ADD_CXXFLAGS": ["-Wno-error=pedantic"] }'`
|
export JUST_BUILD_CONF=`echo $PATH | jq -R '{ ENV: { PATH: . }, "ADD_CFLAGS": ["-Wno-error=pedantic"], "ADD_CXXFLAGS": ["-Wno-error=pedantic", "-D__unix__", "-DFMT_HEADER_ONLY"], "ARCH": "'$(uname -m)'" }'`
|
||||||
|
|
||||||
mkdir ../build
|
mkdir ../build
|
||||||
python3 ./bin/bootstrap.py `pwd` ../build "`pwd`/.distfiles"
|
python3 ./bin/bootstrap.py `pwd` ../build "`pwd`/.distfiles"
|
||||||
|
Loading…
Reference in New Issue
Block a user