Skip to content

Commit

Permalink
Flake
Browse files Browse the repository at this point in the history
  • Loading branch information
KamWithK committed Dec 15, 2024
1 parent 1ef191f commit 9470f70
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 0 deletions.
94 changes: 94 additions & 0 deletions flake.lock

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

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

outputs =
{
nixpkgs,
utils,
...
}:
utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
defaultPackage =
with pkgs;
rustPlatform.buildRustPackage {
name = "libninja";
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
};
devShell =
with pkgs;
mkShell {
nativeBuildInputs = [
pkg-config
autoPatchelfHook
];
buildInputs = [
cargo
rustc
rustfmt
rustPackages.clippy
];
RUST_SRC_PATH = rustPlatform.rustLibSrc;
};
}
);
}

0 comments on commit 9470f70

Please sign in to comment.