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
29 changes: 25 additions & 4 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,32 @@ jobs:
contents: write
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
fetch-depth: 0

- name: Install Nix
uses: cachix/install-nix-action@v31

- name: Build package
id: build
continue-on-error: true
run: nix build -f default.nix
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal

- name: Install fixsha
run: cargo install fixsha

- name: Run fixsha
run: fixsha

- name: Commit hash fixes
if: github.event_name == 'pull_request'
run: |
if [[ -n $(git status -s package.nix) ]]; then
git config user.name "Akrm Al-Hakimi"
git config user.email "alhakimiakrmj@gmail.com"
git add package.nix
git commit -m "chore(nix): fix cargoHash"
git push
fi
4 changes: 2 additions & 2 deletions package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage {

src = ./.;

cargoHash = "sha256-MhxJFul0+N7K2s/5HaLy2JkEJxCAp4I8B62yw5CIZkY=";
cargoHash = "sha256-B66aZgJyhk3cn9yz125Nf2on+6PC/kvee4HiIVThhfg=";

nativeBuildInputs = [
pkg-config
Expand Down Expand Up @@ -47,4 +47,4 @@ rustPlatform.buildRustPackage {
mainProgram = "nmrs";
platforms = platforms.linux ++ platforms.darwin;
};
}
}
Loading