70 lines
1.8 KiB
Nix
70 lines
1.8 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
|
|
texlive.combined.scheme-full
|
|
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
|
|
spdlog
|
|
]);
|
|
};
|
|
});
|
|
}
|