Skip to content

Commit

Permalink
simplify drv (#8)
Browse files Browse the repository at this point in the history
* show trace

* dump logs

* simplify drv

* trace

* don't cancel in progress

* more prints

* running out of ideas

* dont trap

* very verbose

* i hate

* cachix hash fix

* fix $$

* bad echo...

* don't use command -v

* ld-floxlib is segfaulting...

* don't use LD_AUDIT

* restore strict mode to test

* LD_DEBUG

* LD_FLOXLIB_DEBUG

* gdb it up

* Update compare-nix.yml

* use other branch for ld-floxlib

* drop GDB

* kill capacitor with fire

* build works again

* dont build for i686-linux

* mock capacitor metadata
  • Loading branch information
aakropotkin authored Jun 30, 2023
1 parent d0059cf commit 262bc21
Show file tree
Hide file tree
Showing 12 changed files with 344 additions and 1,637 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/compare-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,22 @@ on:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
#cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Install Nix
uses: cachix/install-nix-action@11f4ad19be46fd34c005a2864996d8f197fb51c6
uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac
with:
install_url: https://releases.nixos.org/nix/nix-2.16.1/install
install_url: https://releases.nixos.org/nix/nix-2.15.1/install
nix_path: nixpkgs=channel:nixpkgs-23.05
extra_nix_config: |
experimental-features = nix-command flakes
experimental-features = nix-command flakes ca-derivations impure-derivations fetch-closure
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://cache.nixos.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
trusted-substituters = https://cache.floxdev.com
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= flox-store-public-0:8c/B+kjIaQ+BloCmNkRUKwaVPFWkriSAd0JJvuDu4F0=
max-jobs = auto
cores = 0
substitute = true
Expand All @@ -37,6 +38,7 @@ jobs:
connect-timeout = 5
stalled-download-timeout = 90
timeout = 0
allow-import-from-derivation = true
- name: Setup Nix Registry
run: |
Expand All @@ -46,25 +48,28 @@ jobs:
- name: SQLite3 pkg-config Test
shell: bash
env:
REPO: ${{ github.repository }}
#FLOX_NOSET_LD_AUDIT: 1
run: |
set -eu;
set -o pipefail;
_ec=0;
trap '_ec="$?"; echo "ERROR: code $_ec" >&2; exit "$_ec";' HUP TERM INT;
if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then
selfURI="github:${{ github.repository }}";
selfURI="github:$REPO";
else
selfURI="github:${{ github.repository }}/$GITHUB_REF";
selfURI="github:$REPO/$GITHUB_REF";
fi
echo "selfURI: $selfURI" >&2;
echo "Installing deps" >&2;
nix profile install 'nixpkgs#sqlite^bin,out,dev';
nix profile install 'nixpkgs#pkg-config';
nix profile install "$selfURI#etc-profiles";
nix profile install 'nixpkgs#sqlite^bin,out,dev' -L;
nix profile install 'nixpkgs#pkg-config' -L;
nix profile install "$selfURI#etc-profiles" -L;
echo "Activating env" >&2;
export FLOX_ENV="$HOME/.nix-profile";
export LD_FLOXLIB_DEBUG=1;
. "$FLOX_ENV/etc/profile";
echo "Checking if pkg-config can find sqlite" >&2;
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/trivial-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
#cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
Expand All @@ -40,20 +40,10 @@ jobs:
run: |
set -eu;
set -o pipefail;
_ec=0;
trap '_ec="$?"; echo "ERROR: code $_ec" >&2; exit "$_ec";' HUP TERM INT;
echo "Creating sqlite-dev" >&2;
flox create -e sqlite-dev;
trap '
_ec="$?";
echo "ERROR: code $_ec" >&2;
flox destroy -e sqlite-dev;
exit "$_ec";
' HUP TERM INT;
trap '_ec="$?"; flox destroy -e sqlite-dev; exit "$_ec";' EXIT;
echo "Creating flox.nix" >&2;
cat <<'EOF' > ./flox.nix
{
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/.flox
result
result-*
Loading

0 comments on commit 262bc21

Please sign in to comment.