Skip to content

Commit

Permalink
feat: added a Nix Flake to build Mandelbrot using Naersk
Browse files Browse the repository at this point in the history
  • Loading branch information
jortrr committed May 14, 2024
1 parent 6b03ad9 commit 78b0cba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ target/
*.pdb

#VS Code workspaces
**/*.code-workspace
**/*.code-workspace
8 changes: 4 additions & 4 deletions flake.lock

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

5 changes: 3 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
inputs = {
flake-utils.url = "github:numtide/flake-utils";
naersk.url = "github:nix-community/naersk";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
};

outputs = { self, flake-utils, naersk, nixpkgs }:
Expand All @@ -18,11 +18,12 @@
# For `nix build` & `nix run`:
defaultPackage = naersk'.buildPackage {
src = ./.;
buildInputs = [ pkgs.libxkbcommon ];
};

# For `nix develop`:
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ rustc cargo ];
nativeBuildInputs = with pkgs; [ rustc cargo libxkbcommon ];
};
}
);
Expand Down

0 comments on commit 78b0cba

Please sign in to comment.