Skip to content

Commit

Permalink
build: add nix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
manankarnik committed Jan 12, 2024
1 parent 3aa437e commit 75240dc
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 0 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
/Cargo.lock
dist/
.direnv/
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.

25 changes: 25 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
};
in
with pkgs;
{
devShells.default = mkShell rec {
nativeBuildInputs = [
pkg-config
];
buildInputs = [ udev alsa-lib vulkan-loader cairo gtk3 ];
LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;
};
}
);
}

0 comments on commit 75240dc

Please sign in to comment.