advent-of-code/flake.nix

35 lines
984 B
Nix
Raw Normal View History

2021-11-25 16:14:32 +01:00
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
2021-11-25 16:14:32 +01:00
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs { inherit system overlays; };
2022-12-06 01:17:46 +01:00
myRust = pkgs.rust-bin.stable.latest.default.override {
extensions = ["rust-src" "rust-analysis"];
};
2021-11-25 16:14:32 +01:00
in
{
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
nixpkgs-fmt
rust-analyzer
myRust
2021-12-06 15:05:29 +01:00
self.packages.${system}.aoc-get
2021-11-25 16:14:32 +01:00
];
RUST_SRC_PATH = "${pkgs.rust-bin.stable.latest.rust-src}/lib/rustlib/src/rust/library";
};
2021-12-06 15:05:29 +01:00
packages = {
aoc-get = pkgs.callPackage ./aoc-get {};
};
2021-11-25 16:14:32 +01:00
});
}