Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 12 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ jobs:
if: matrix.platform != 'amd64'
uses: docker/setup-qemu-action@v3

- name: Set docker arch
run: |
platform=${{ matrix.platform }}
if [[ $platform == arm64v8 ]]; then
platform=arm64
elif [[ $platform == arm32v7 ]]; then
platform=arm
fi
echo "DOCKER_PLATFORM=$platform" >> $GITHUB_ENV

- uses: actions/download-artifact@v3
with:
name: patchelf
Expand Down Expand Up @@ -100,7 +110,7 @@ jobs:
else
ENTRYPOINT=
fi
docker run -e CXXFLAGS -v $(pwd):/gha ${{ matrix.platform }}/alpine:edge ${ENTRYPOINT} sh -ec "cd /gha && sh ./build.sh"
docker run --platform "$DOCKER_PLATFORM" -e CXXFLAGS -v $(pwd):/gha ${{ matrix.platform }}/alpine:edge ${ENTRYPOINT} sh -ec "cd /gha && sh ./build.sh"
- name: Check binaries
run: |
cat <<EOF > check.sh
Expand All @@ -109,7 +119,7 @@ jobs:
tar -xf ./dist/patchelf-*-*.tar.gz
./bin/patchelf --version
EOF
docker run -v $(pwd):/gha ${{ matrix.platform }}/debian:unstable-slim sh -ec "cd /gha && sh ./check.sh"
docker run --platform "$DOCKER_PLATFORM" -v $(pwd):/gha ${{ matrix.platform }}/debian:unstable-slim sh -ec "cd /gha && sh ./check.sh"
- uses: actions/upload-artifact@v3
with:
name: patchelf
Expand Down
11 changes: 6 additions & 5 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
description = "A tool for modifying ELF executables and libraries";

inputs.nixpkgs.url = "nixpkgs/nixpkgs-unstable";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";

outputs = { self, nixpkgs }:

Expand Down Expand Up @@ -36,6 +36,11 @@
versionSuffix = ""; # obsolete
src = self;
preAutoconf = "echo ${version} > version";

# portable configure shouldn't have a shebang pointing to the nix store
postConfigure = ''
sed -i '1s|^.*$|#!/bin/sh|' ./configure
'';
postDist = ''
cp README.md $out/
echo "doc readme $out/README.md" >> $out/nix-support/hydra-build-products
Expand Down
Loading