Created
October 18, 2021 02:32
-
-
Save Riey/636ead6c91d50415a79fe8b7b90529ac to your computer and use it in GitHub Desktop.
Nix direnv template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use flake |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "A very basic flake"; | |
inputs = { | |
nixpkgs.url = github:NixOS/nixpkgs; | |
flake-utils.url = github:numtide/flake-utils; | |
}; | |
outputs = { self, nixpkgs, flake-utils }: | |
flake-utils.lib.eachDefaultSystem | |
(system: | |
let pkgs = nixpkgs.legacyPackages.${system}; in | |
{ | |
devShell = pkgs.mkShell { | |
name = "template-shell"; | |
buildInputs = with pkgs; [ | |
alsa-lib | |
udev | |
]; | |
nativeBuildInputs = with pkgs; [ | |
pkg-config | |
cmake | |
extra-cmake-modules | |
cargo rustc cargo-outdated cargo-edit cargo-feature | |
llvmPackages_13.clang | |
llvmPackages_13.libclang.lib | |
llvmPackages_13.bintools | |
]; | |
LIBCLANG_PATH = "${pkgs.llvmPackages_13.libclang.lib}/lib"; | |
}; | |
defaultPackage = pkgs.hello; | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment