Skip to content

Commit

Permalink
Does this create the environment variables?
Browse files Browse the repository at this point in the history
Why is this so complicated?  I thought the nixpkgs were
defined in flake.lock?
hacklschorsch committed Dec 5, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent a4a9c89 commit 6d99d58
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -23,9 +23,6 @@ on:
jobs:
packaging:
runs-on: ubuntu-22.04
env:
NIXPKGS: ${{ needs.check.outputs.NIXPKGS }}
NIX_PATH: ${{ needs.check.outputs.NIX_PATH }}
strategy:
fail-fast: false
matrix:
@@ -41,6 +38,11 @@ jobs:
fetch-depth: 0
fetch-tags: true

- name: Set environment variables
run: |
echo "NIXPKGS=$(nix flake metadata | grep -E '[^\w]+nixpkgs-${{ matrix.nixpkgs }}[^\w]+:' | cut -d' ' -f2 | cut -d'?' -f1)" >> $GITHUB_ENV
echo "NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/${NIXPKGS##*/}.tar.gz" >> $GITHUB_ENV
- name: Install nix
id: install_nix
uses: nixbuild/nix-quick-install-action@v28

0 comments on commit 6d99d58

Please sign in to comment.