mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-02 10:14:09 +00:00
Merge pull request #316224 from aehlig/justbuild-1.3.1
justbuild: 1.2.4 -> 1.3.1
This commit is contained in:
commit
4bf9ce4a4c
@ -11,7 +11,7 @@
|
|||||||
openssl,
|
openssl,
|
||||||
|
|
||||||
pkg-config,
|
pkg-config,
|
||||||
protobuf_24,
|
protobuf_25,
|
||||||
grpc,
|
grpc,
|
||||||
pandoc,
|
pandoc,
|
||||||
python3,
|
python3,
|
||||||
@ -19,6 +19,7 @@
|
|||||||
wget,
|
wget,
|
||||||
lib,
|
lib,
|
||||||
jq,
|
jq,
|
||||||
|
coreutils,
|
||||||
|
|
||||||
curl,
|
curl,
|
||||||
libarchive,
|
libarchive,
|
||||||
@ -27,13 +28,13 @@ let stdenv = gccStdenv;
|
|||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "justbuild";
|
pname = "justbuild";
|
||||||
version = "1.2.4";
|
version = "1.3.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "just-buildsystem";
|
owner = "just-buildsystem";
|
||||||
repo = "justbuild";
|
repo = "justbuild";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-+ZQuMWqZyK7x/tPSi2ldSOpAexpX6ku4ikk/V8m6Ksg=";
|
sha256 = "sha256-kv7HpDEYZml5uk06s8Cxt5rEpxaJBz9s+or6Od1q4Io=";
|
||||||
};
|
};
|
||||||
|
|
||||||
bazelapi = fetchurl {
|
bazelapi = fetchurl {
|
||||||
@ -54,6 +55,7 @@ stdenv.mkDerivation rec {
|
|||||||
python3
|
python3
|
||||||
unzip
|
unzip
|
||||||
wget
|
wget
|
||||||
|
coreutils
|
||||||
|
|
||||||
# Dependencies of just
|
# Dependencies of just
|
||||||
cli11
|
cli11
|
||||||
@ -75,21 +77,14 @@ stdenv.mkDerivation rec {
|
|||||||
grpc
|
grpc
|
||||||
libgit2
|
libgit2
|
||||||
openssl
|
openssl
|
||||||
# Using protobuf 24 because the current version of grpc is build using
|
protobuf_25
|
||||||
# protobuf 24 and therefore the older protobuf version causes errors
|
|
||||||
# during build.
|
|
||||||
# Upstream currently uses protobuf 23 for bundled builds
|
|
||||||
# For future updates: The currently used version can be found in the file
|
|
||||||
# etc/repos.json: https://github.com/just-buildsystem/justbuild/blob/master/etc/repos.json
|
|
||||||
# under the key .repositories.protobuf
|
|
||||||
protobuf_24
|
|
||||||
python3
|
python3
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -ie 's|\./bin/just-mr.py|${python3}/bin/python3 ./bin/just-mr.py|' bin/bootstrap.py
|
sed -ie 's|\./bin/just-mr.py|${python3}/bin/python3 ./bin/just-mr.py|' bin/bootstrap.py
|
||||||
sed -ie 's|#!/usr/bin/env python3|#!${python3}/bin/python3|' bin/parallel-bootstrap-traverser.py
|
sed -ie 's|#!/usr/bin/env python3|#!${python3}/bin/python3|' bin/parallel-bootstrap-traverser.py
|
||||||
jq '.repositories.protobuf.pkg_bootstrap.local_path = "${protobuf_24}"' etc/repos.json > etc/repos.json.patched
|
jq '.repositories.protobuf.pkg_bootstrap.local_path = "${protobuf_25}"' etc/repos.json > etc/repos.json.patched
|
||||||
mv etc/repos.json.patched etc/repos.json
|
mv etc/repos.json.patched etc/repos.json
|
||||||
jq '.repositories.com_github_grpc_grpc.pkg_bootstrap.local_path = "${grpc}"' etc/repos.json > etc/repos.json.patched
|
jq '.repositories.com_github_grpc_grpc.pkg_bootstrap.local_path = "${grpc}"' etc/repos.json > etc/repos.json.patched
|
||||||
mv etc/repos.json.patched etc/repos.json
|
mv etc/repos.json.patched etc/repos.json
|
||||||
@ -133,7 +128,6 @@ stdenv.mkDerivation rec {
|
|||||||
__EOF__
|
__EOF__
|
||||||
export PKG_CONFIG_PATH=`pwd`/.pkgconfig''${PKG_CONFIG_PATH:+:}$PKG_CONFIG_PATH
|
export PKG_CONFIG_PATH=`pwd`/.pkgconfig''${PKG_CONFIG_PATH:+:}$PKG_CONFIG_PATH
|
||||||
|
|
||||||
|
|
||||||
# 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" ]'
|
||||||
@ -143,8 +137,7 @@ stdenv.mkDerivation rec {
|
|||||||
python3 ./bin/bootstrap.py `pwd` ../build "`pwd`/.distfiles"
|
python3 ./bin/bootstrap.py `pwd` ../build "`pwd`/.distfiles"
|
||||||
|
|
||||||
# Build compiled just-mr
|
# Build compiled just-mr
|
||||||
mkdir ../build-root
|
../build/out/bin/just install 'installed just-mr' -c ../build/build-conf.json -C ../build/repo-conf.json --output-dir ../build/out --local-build-root ../build/.just
|
||||||
../build/out/bin/just install 'installed just-mr' -c ../build/build-conf.json -C ../build/repo-conf.json --output-dir ../build/out --local-build-root ../build-root
|
|
||||||
|
|
||||||
# convert man pages from Markdown to man
|
# convert man pages from Markdown to man
|
||||||
find "./share/man" -name "*.md" -exec sh -c '${pandoc}/bin/pandoc --standalone --to man -o "''${0%.md}" "''${0}"' {} \;
|
find "./share/man" -name "*.md" -exec sh -c '${pandoc}/bin/pandoc --standalone --to man -o "''${0%.md}" "''${0}"' {} \;
|
||||||
@ -160,6 +153,7 @@ stdenv.mkDerivation rec {
|
|||||||
install -m 755 -Dt "$out/bin" "../build/out/bin/just"
|
install -m 755 -Dt "$out/bin" "../build/out/bin/just"
|
||||||
install -m 755 -Dt "$out/bin" "../build/out/bin/just-mr"
|
install -m 755 -Dt "$out/bin" "../build/out/bin/just-mr"
|
||||||
install -m 755 -DT "bin/just-import-git.py" "$out/bin/just-import-git"
|
install -m 755 -DT "bin/just-import-git.py" "$out/bin/just-import-git"
|
||||||
|
install -m 755 -DT "bin/just-deduplicate-repos.py" "$out/bin/just-deduplicate-repos"
|
||||||
|
|
||||||
mkdir -p "$out/share/bash-completion/completions"
|
mkdir -p "$out/share/bash-completion/completions"
|
||||||
install -m 0644 ./share/just_complete.bash "$out/share/bash-completion/completions/just"
|
install -m 0644 ./share/just_complete.bash "$out/share/bash-completion/completions/just"
|
||||||
|
Loading…
Reference in New Issue
Block a user