From 9b7c017b7a36811797b40c4dcba0ce063007b080 Mon Sep 17 00:00:00 2001 From: Akrm Al-Hakimi Date: Wed, 21 Jan 2026 09:14:56 -0500 Subject: [PATCH 1/2] fix(#180): wire fixsha into CI --- .github/workflows/nix.yml | 29 +++++++++++++++++++++++++---- package.nix | 2 +- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index cdbc21bb..d31a7391 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -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 "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add package.nix + git commit -m "chore(nix): fix cargoHash" + git push + fi diff --git a/package.nix b/package.nix index a4d40a33..223c43c5 100644 --- a/package.nix +++ b/package.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage { src = ./.; - cargoHash = "sha256-MhxJFul0+N7K2s/5HaLy2JkEJxCAp4I8B62yw5CIZkY="; + cargoHash = ""; nativeBuildInputs = [ pkg-config From a2ab742d6a03ca0f73ae1e73f5315e4946275530 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 21 Jan 2026 14:30:14 +0000 Subject: [PATCH 2/2] chore(nix): fix cargoHash --- .github/workflows/nix.yml | 4 ++-- package.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index d31a7391..ef091869 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -35,8 +35,8 @@ jobs: if: github.event_name == 'pull_request' run: | if [[ -n $(git status -s package.nix) ]]; then - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" + 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 diff --git a/package.nix b/package.nix index 223c43c5..314f967f 100644 --- a/package.nix +++ b/package.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage { src = ./.; - cargoHash = ""; + cargoHash = "sha256-B66aZgJyhk3cn9yz125Nf2on+6PC/kvee4HiIVThhfg="; nativeBuildInputs = [ pkg-config @@ -47,4 +47,4 @@ rustPlatform.buildRustPackage { mainProgram = "nmrs"; platforms = platforms.linux ++ platforms.darwin; }; -} +} \ No newline at end of file