csci5607/flake.nix
2023-04-26 14:56:07 -05:00

75 lines
1.9 KiB
Nix

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
fenix.url = "github:nix-community/fenix";
};
outputs = { self, nixpkgs, flake-utils, fenix }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ fenix.overlays.default ];
};
toolchain = pkgs.fenix.stable;
flakePkgs = rec {
assignment-2a = pkgs.callPackage ./assignment-2a { };
};
in rec {
packages = flake-utils.lib.flattenTree flakePkgs;
devShell = pkgs.mkShell {
inputsFrom = with flakePkgs; [ assignment-2a ];
packages = (with pkgs; [
cargo-deny
cargo-edit
cargo-expand
cargo-flamegraph
cargo-watch
clang-tools
cmake
dos2unix
imagemagick
linuxPackages_latest.perf
ninja
pandoc
poppler_utils
renderdoc
texlive.combined.scheme-full
unzip
zip
zathura
(python310.withPackages (p: with p; [ ipython numpy scipy sympy ]))
]) ++ (with toolchain; [
cargo
rustc
clippy
# Get the nightly version of rustfmt so we can wrap comments
pkgs.fenix.default.rustfmt
]);
CARGO_UNSTABLE_SPARSE_REGISTRY = "true";
LD_LIBRARY_PATH = with pkgs;
lib.concatStringsSep ":" [ "${libGL}/lib" ];
CMAKE_PREFIX_PATH = with pkgs;
lib.concatMapStringsSep ":" (p: "${p.dev}") [
libglvnd
libGLU
xorg.libX11
xorg.libXcursor
xorg.libXext
xorg.libXi
xorg.libXinerama
xorg.libXrandr
xorg.libXrender
spdlog
];
};
});
}