Skip to content

Commit

Permalink
feat(nix): add a simple flake.nix (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
jla2000 authored Sep 12, 2024
1 parent d7fb511 commit 3c98161
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@

# Backup files generated by rustfmt
**/*.rs.bk

# Nix result symlink
/result
60 changes: 60 additions & 0 deletions flake.lock

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

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

outputs = { nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages = rec {
binsider = pkgs.rustPlatform.buildRustPackage {
name = "binsider";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
checkFlags = [
"--skip=app::tests::test_extract_strings"
"--skip=app::tests::test_init"
];
};
default = binsider;
};
}
);

}

0 comments on commit 3c98161

Please sign in to comment.