Skip to content

Commit

Permalink
Add nix build action (#69)
Browse files Browse the repository at this point in the history
* Add nix build action

As mentioned in #67, this action
builds the default package from the nix flake on pull requests and commits
on main. This should prevent lockfile mismatches in the future :)
(especially because the nix build is currently broken due to openssl vendoring,
I will try to address that soon)

* flake: disable openssl vendoring
  • Loading branch information
junglerobba authored Feb 7, 2024
1 parent 79ab43a commit c545ca0
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
on:
pull_request:
push:
branches: [main]

jobs:
build:
name: Build nix targets
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v3
- name: Build default package
run: nix build
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
};
devShells.default = pkgs.mkShell {
name = "rust devShell";
OPENSSL_NO_VENDOR = 1;
buildInputs = with pkgs;
with pkgs.rustPlatform; [
cargo
Expand All @@ -59,6 +60,7 @@
cargoDeps = final.rustPlatform.importCargoLock {
lockFile = self + "/Cargo.lock";
};
OPENSSL_NO_VENDOR = 1;
});
};

Expand Down

0 comments on commit c545ca0

Please sign in to comment.