initial commit
This commit is contained in:
commit
40e63f04fd
5 changed files with 250 additions and 0 deletions
80
flake.nix
Normal file
80
flake.nix
Normal file
|
@ -0,0 +1,80 @@
|
|||
{
|
||||
description = "A shell for a computadora";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
naersk.url = "github:nix-community/naersk";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
fenix.url = "github:nix-community/fenix";
|
||||
};
|
||||
|
||||
outputs = inputs: with inputs;
|
||||
flake-utils.lib.eachDefaultSystem
|
||||
(system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [fenix.overlays.default];
|
||||
# overlays = [cargo2nix.overlays.default];
|
||||
};
|
||||
naersk' = pkgs.callPackage naersk {};
|
||||
nbi = with pkgs; [
|
||||
# Rust tools
|
||||
alejandra
|
||||
(pkgs.fenix.stable.withComponents [
|
||||
"cargo"
|
||||
"clippy"
|
||||
"rust-src"
|
||||
"rustc"
|
||||
"rustfmt"
|
||||
])
|
||||
rust-analyzer
|
||||
gtk-layer-shell
|
||||
gtk3
|
||||
vulkan-loader
|
||||
wayland
|
||||
wayland-protocols
|
||||
libxkbcommon
|
||||
pkg-config
|
||||
];
|
||||
|
||||
bi = with pkgs; [
|
||||
gcc
|
||||
stdenv
|
||||
gnumake
|
||||
gdb
|
||||
makeWrapper
|
||||
vulkan-headers
|
||||
vulkan-loader
|
||||
vulkan-tools
|
||||
libGL
|
||||
|
||||
just
|
||||
cargo-watch
|
||||
];
|
||||
in rec
|
||||
{
|
||||
devShell = pkgs.mkShell {
|
||||
nativeBuildInputs = nbi;
|
||||
buildInputs = bi;
|
||||
LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${
|
||||
with pkgs;
|
||||
pkgs.lib.makeLibraryPath [
|
||||
pkgs.vulkan-loader
|
||||
pkgs.wayland
|
||||
pkgs.wayland-protocols
|
||||
pkgs.libxkbcommon
|
||||
]
|
||||
}";
|
||||
};
|
||||
defaultPackage = naersk'.buildPackage {
|
||||
src = ./.;
|
||||
};
|
||||
packages = {
|
||||
default = naersk'.buildPackage {
|
||||
src = ./.;
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue