forked from M-Labs/artiq-extrapkg
Egor Savkin
eac0d077de
Package appeared to have /nix/store... path instead of normal clang64 Signed-off-by: Egor Savkin <es@m-labs.hk>
29 lines
771 B
Plaintext
29 lines
771 B
Plaintext
arch=("any")
|
|
mingw_arch=("clang64")
|
|
pkgver=${DRV_VERSION}
|
|
url="https://m-labs.hk"
|
|
source=("source.tar")
|
|
sha256sums=("SKIP")
|
|
|
|
build() {
|
|
mkdir clang64
|
|
export PYTHONPATH=`pwd`/clang64/lib/python3.11/site-packages
|
|
chmod +w -R source
|
|
cd source
|
|
wine-msys2-build python -m build --wheel --skip-dependency-check --no-isolation
|
|
}
|
|
|
|
package() {
|
|
cd source
|
|
wine-msys2-build python -m installer --destdir="${pkgdir}" --prefix="clang64/" dist/*.whl
|
|
# patch broken shebangs (Z:/nix/store/...)
|
|
for entrypoint in ${pkgdir}/bin/*-script.py; do
|
|
[ -f "$entrypoint" ] || continue
|
|
sed -i "1s|#!.*|#!python|" $entrypoint
|
|
done
|
|
for entrypoint in ${pkgdir}/bin/*-script.pyw; do
|
|
[ -f "$entrypoint" ] || continue
|
|
sed -i "1s|#!.*|#!pythonw|" $entrypoint
|
|
done
|
|
}
|