Skip to content

Commit

Permalink
add nix support for building and development (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
senyc committed Apr 29, 2024
1 parent 519e21a commit 6f54383
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 0 deletions.
6 changes: 6 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{pkgs}:
pkgs.rustPlatform.buildRustPackage {
name = "kx";
cargoHash = "sha256-SNV81sV9lTy/Hymy5xyve9asDIyW8ia/wHjx/JRGz2Q=";
src = ./.;
}
61 changes: 61 additions & 0 deletions flake.lock

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

21 changes: 21 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/master";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachSystem ["x86_64-linux"] (system: let
pkgs = nixpkgs.legacyPackages.${system};
kx = import ./default.nix {inherit pkgs;};
in {
packages.default = kx;
devShells.default = pkgs.mkShell {
name = "kx";
packages = [kx];
};
});
}

0 comments on commit 6f54383

Please sign in to comment.