2023-01-21 08:03:11 +00:00
|
|
|
{
|
2023-03-25 10:05:53 +00:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs";
|
|
|
|
fenix.url = "github:nix-community/fenix";
|
|
|
|
};
|
2023-01-21 08:03:11 +00:00
|
|
|
|
|
|
|
outputs = { self, nixpkgs, flake-utils, fenix }:
|
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [ fenix.overlays.default ];
|
|
|
|
};
|
|
|
|
|
2023-01-21 08:55:19 +00:00
|
|
|
toolchain = pkgs.fenix.stable;
|
2023-04-03 07:56:41 +00:00
|
|
|
|
|
|
|
flakePkgs = rec {
|
|
|
|
assignment-2a = pkgs.callPackage ./assignment-2a { };
|
|
|
|
};
|
2023-01-21 08:03:11 +00:00
|
|
|
in rec {
|
2023-04-03 07:56:41 +00:00
|
|
|
packages = flake-utils.lib.flattenTree flakePkgs;
|
|
|
|
|
2023-01-21 08:03:11 +00:00
|
|
|
devShell = pkgs.mkShell {
|
2023-04-03 07:56:41 +00:00
|
|
|
inputsFrom = with flakePkgs; [ assignment-2a ];
|
|
|
|
|
2023-02-01 22:13:48 +00:00
|
|
|
packages = (with pkgs; [
|
|
|
|
cargo-deny
|
|
|
|
cargo-edit
|
2023-02-25 21:50:13 +00:00
|
|
|
cargo-expand
|
2023-02-15 19:09:56 +00:00
|
|
|
cargo-flamegraph
|
|
|
|
cargo-watch
|
2023-04-03 07:56:41 +00:00
|
|
|
clang-tools
|
|
|
|
cmake
|
2023-04-04 07:22:46 +00:00
|
|
|
dos2unix
|
2023-02-15 19:09:56 +00:00
|
|
|
imagemagick
|
2023-02-15 23:13:22 +00:00
|
|
|
linuxPackages_latest.perf
|
2023-04-04 07:22:46 +00:00
|
|
|
ninja
|
2023-02-01 22:13:48 +00:00
|
|
|
pandoc
|
2023-03-03 07:58:45 +00:00
|
|
|
poppler_utils
|
2023-04-26 00:52:54 +00:00
|
|
|
renderdoc
|
2023-02-01 22:13:48 +00:00
|
|
|
texlive.combined.scheme-full
|
2023-02-15 19:09:56 +00:00
|
|
|
unzip
|
|
|
|
zip
|
2023-04-26 19:56:07 +00:00
|
|
|
zathura
|
2023-02-05 04:55:07 +00:00
|
|
|
|
2023-05-03 22:47:37 +00:00
|
|
|
(python310.withPackages
|
|
|
|
(p: with p; [ ipython numpy scipy sympy pillow ]))
|
2023-02-01 22:13:48 +00:00
|
|
|
]) ++ (with toolchain; [
|
|
|
|
cargo
|
|
|
|
rustc
|
|
|
|
clippy
|
2023-01-31 20:41:23 +00:00
|
|
|
|
2023-02-01 22:13:48 +00:00
|
|
|
# Get the nightly version of rustfmt so we can wrap comments
|
|
|
|
pkgs.fenix.default.rustfmt
|
|
|
|
]);
|
2023-01-21 08:03:11 +00:00
|
|
|
CARGO_UNSTABLE_SPARSE_REGISTRY = "true";
|
2023-04-03 07:56:41 +00:00
|
|
|
|
2023-04-05 23:53:50 +00:00
|
|
|
LD_LIBRARY_PATH = with pkgs;
|
|
|
|
lib.concatStringsSep ":" [ "${libGL}/lib" ];
|
|
|
|
|
|
|
|
CMAKE_PREFIX_PATH = with pkgs;
|
|
|
|
lib.concatMapStringsSep ":" (p: "${p.dev}") [
|
2023-04-03 07:56:41 +00:00
|
|
|
libglvnd
|
|
|
|
libGLU
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXinerama
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXrender
|
2023-04-04 07:22:46 +00:00
|
|
|
spdlog
|
2023-04-05 23:53:50 +00:00
|
|
|
];
|
2023-01-21 08:03:11 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|