csci5607/flake.nix
2023-04-03 02:56:41 -05:00

68 lines
1.7 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
imagemagick
linuxPackages_latest.perf
pandoc
poppler_utils
texlive.combined.scheme-full
ninja
unzip
zip
(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";
CMAKE_PREFIX_PATH = pkgs.lib.concatMapStringsSep ":" (p: "${p.dev}")
(with pkgs; [
libglvnd
libGLU
xorg.libX11
xorg.libXcursor
xorg.libXext
xorg.libXi
xorg.libXinerama
xorg.libXrandr
xorg.libXrender
]);
};
});
}