Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 48 additions & 18 deletions P/pixi/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -1,28 +1,61 @@
using BinaryBuilder

name = "pixi"
version = v"0.41.3"
version = v"0.63.2"
gitsha = "7a53925d6fa0bdc1019d17648f6e6aaa3ee02c9b"

# Collection of sources required to build pixi
sources = [
GitSource("https://github.com/prefix-dev/pixi.git", "fc3e1a861deac099e51f7f0c3eaa2f64e217d4bf"),
# the tarballs do not include the license, so we get the repo too
GitSource("https://github.com/prefix-dev/pixi.git", gitsha, unpack_target="repo"),
# pre-build tarballs, which only contain the executable
FileSource(
"https://github.com/prefix-dev/pixi/releases/download/v$version/pixi-aarch64-apple-darwin.tar.gz",
"28fca5e7335b5f6b5b05acb9f83b61fa65e27e5dd69fe7a1750aa884ea4163cb",
filename="pixi-aarch64-apple-darwin20.tar.gz",
),
FileSource(
"https://github.com/prefix-dev/pixi/releases/download/v$version/pixi-x86_64-apple-darwin.tar.gz",
"85ea41d0310acd8e13edf4923b65c101fc3fc5f8d2ee48d85d64f2bcd9781830",
filename="pixi-x86_64-apple-darwin14.tar.gz",
),
FileSource(
"https://github.com/prefix-dev/pixi/releases/download/v$version/pixi-aarch64-pc-windows-msvc.zip",
"7df325a6ca158676a75710e16b20d3b621234852cdc9e733ee9c523b37abc3a9",
filename="pixi-aarch64-w64-mingw32.zip",
),
FileSource(
"https://github.com/prefix-dev/pixi/releases/download/v$version/pixi-x86_64-pc-windows-msvc.zip",
"8a2e31c293ce0a308c2dcf3fae599465bdc97dbd8eefbd320e8ae6cf22de9262",
filename="pixi-x86_64-w64-mingw32.zip",
),
FileSource(
"https://github.com/prefix-dev/pixi/releases/download/v$version/pixi-aarch64-unknown-linux-musl.tar.gz",
"dbde6dbc2806602171e17305ce005e1aed519f2f2461a7cafd0093e92b7e7681",
filename="pixi-aarch64-linux-gnu.tar.gz",
),
FileSource(
"https://github.com/prefix-dev/pixi/releases/download/v$version/pixi-x86_64-unknown-linux-musl.tar.gz",
"b2a9e26bb6c80fe00618a02e7198dec222e1fbcec61e04c11b6e6538089ab100",
filename="pixi-x86_64-linux-gnu.tar.gz",
),
]

# Bash recipe for building across all platforms
script = raw"""
cd pixi
cd $WORKSPACE/srcdir

# not enough space in /tmp
export TMPDIR=$WORKSPACE/tmp
mkdir $TMPDIR
# unpack and install the binary
if [[ $target = *-w64-* ]]; then
unzip pixi-$target.zip
install -Dvm 755 pixi.exe "${bindir}/pixi.exe"
else
tar -xzf pixi-$target.tar.gz
install -Dvm 755 pixi "${bindir}/pixi"
fi

# the stack-size arg is wrong on windows, because we're using mingw not msvc
sed -i 's|/STACK:|-Wl,--stack,|' .cargo/config.toml

# build pixi
cargo build --release

# install pixi
install -Dvm 755 "target/${rust_target}/release/pixi${exeext}" "${bindir}/pixi${exeext}"
# install the license
install_license repo/pixi/LICENSE
"""

# Supported platforms from https://github.com/prefix-dev/pixi/releases/latest
Expand All @@ -36,8 +69,6 @@ platforms = [
# linux
Platform("aarch64", "linux"; libc="glibc"),
Platform("x86_64", "linux"; libc="glibc"),
Platform("x86_64", "linux"; libc="musl"), # also happens to build
Platform("powerpc64le", "linux"; libc="glibc"), # also happens to build
]

# The products that we will ensure are always built
Expand All @@ -50,5 +81,4 @@ dependencies = Dependency[]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
compilers=[:c, :rust], julia_compat="1.6", lock_microarchitecture=false,
lazy_artifacts=true)
julia_compat="1.6", lock_microarchitecture=false, lazy_artifacts=true)