build(nix): add a flake
nix run github:michel/soulseek-rs/master builds the release branch and /develop the nightly. The lock is not optional: without one nix refuses a github: reference outright and hides the commit from the build, so the version stamp read +dirty.
This commit is contained in:
@@ -3,6 +3,8 @@ name: Packaging
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'flake.nix'
|
||||
- 'flake.lock'
|
||||
- 'Cargo.lock'
|
||||
- 'Cargo.toml'
|
||||
- 'packaging/**'
|
||||
@@ -65,3 +67,21 @@ jobs:
|
||||
rpm -ql soulseek-rs | grep -Fx /usr/share/man/man1/soulseek-rs.1.gz
|
||||
rpm -ql soulseek-rs | grep -Fx /usr/share/zsh/site-functions/_soulseek-rs
|
||||
"
|
||||
|
||||
flake:
|
||||
name: Nix flake
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: cachix/install-nix-action@v31
|
||||
|
||||
- name: Build and run
|
||||
run: |
|
||||
nix build --print-build-logs
|
||||
./result/bin/soulseek-rs --version | grep -E '\+git[0-9]{12}\.[0-9a-f]{7}$'
|
||||
test -s result/share/man/man1/soulseek-rs.1.gz
|
||||
test -s result/share/fish/vendor_completions.d/soulseek-rs.fish
|
||||
|
||||
Reference in New Issue
Block a user