Skip to content

Commit

Permalink
build: add flake and hydra job
Browse files Browse the repository at this point in the history
  • Loading branch information
icecreammatt committed Dec 16, 2023
1 parent f9caa63 commit 5adeb0b
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 0 deletions.
95 changes: 95 additions & 0 deletions flake.lock

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

22 changes: 22 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
inputs = {
naersk.url = "github:nix-community/naersk/master";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, utils, naersk }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
naersk-lib = pkgs.callPackage naersk { };
in
{
hydraJobs."tester" = self.defaultPackage;
defaultPackage = naersk-lib.buildPackage ./.;
devShell = with pkgs; mkShell {
buildInputs = [ cargo rustc rustfmt pre-commit rustPackages.clippy ];
RUST_SRC_PATH = rustPlatform.rustLibSrc;
};
});
}

0 comments on commit 5adeb0b

Please sign in to comment.