aoc24/flake.nix

36 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2024-12-21 11:09:23 -08:00
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # We want to use packages from the binary cache
flake-utils.url = "github:numtide/flake-utils";
gitignore = { url = "github:hercules-ci/gitignore.nix"; flake = false; };
};
outputs = inputs@{ self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: let
pkgs = nixpkgs.legacyPackages.${system};
gitignoreSrc = pkgs.callPackage inputs.gitignore { };
in rec {
packages.aoc_24 = pkgs.callPackage ./default.nix { inherit gitignoreSrc; };
legacyPackages = packages;
defaultPackage = packages.aoc_24;
devShell = pkgs.mkShell rec {
CARGO_INSTALL_ROOT = "${toString ./.}/.cargo";
buildInputs = with pkgs; [ cargo rustc git
udev
alsa-lib vulkan-loader
xorg.libX11 xorg.libXcursor xorg.libXi xorg.libXrandr # To use the x11 feature
libxkbcommon wayland # To use the wayland feature
];
nativeBuildInputs = [ pkgs.pkg-config ];
env = {
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath buildInputs}";
};
};
});
}