Skip to content

Commit 6f54383

Browse files
authored
add nix support for building and development (#3)
1 parent 519e21a commit 6f54383

File tree

3 files changed

+88
-0
lines changed

3 files changed

+88
-0
lines changed

default.nix

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{pkgs}:
2+
pkgs.rustPlatform.buildRustPackage {
3+
name = "kx";
4+
cargoHash = "sha256-SNV81sV9lTy/Hymy5xyve9asDIyW8ia/wHjx/JRGz2Q=";
5+
src = ./.;
6+
}

flake.lock

+61
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:NixOS/nixpkgs/master";
4+
flake-utils.url = "github:numtide/flake-utils";
5+
};
6+
outputs = {
7+
self,
8+
nixpkgs,
9+
flake-utils,
10+
}:
11+
flake-utils.lib.eachSystem ["x86_64-linux"] (system: let
12+
pkgs = nixpkgs.legacyPackages.${system};
13+
kx = import ./default.nix {inherit pkgs;};
14+
in {
15+
packages.default = kx;
16+
devShells.default = pkgs.mkShell {
17+
name = "kx";
18+
packages = [kx];
19+
};
20+
});
21+
}

0 commit comments

Comments
 (0)