Skip to content

Instantly share code, notes, and snippets.

@Riey
Created October 18, 2021 02:32
Show Gist options
  • Save Riey/636ead6c91d50415a79fe8b7b90529ac to your computer and use it in GitHub Desktop.
Save Riey/636ead6c91d50415a79fe8b7b90529ac to your computer and use it in GitHub Desktop.
Nix direnv template
use flake
{
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