This commit is contained in:
Marc Plano-Lesay 2025-04-24 22:27:11 +10:00
commit 2892a0d272
Signed by: kernald
GPG key ID: 66A41B08CC62A6CF
11 changed files with 2641 additions and 0 deletions

49
flake.nix Normal file
View file

@ -0,0 +1,49 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{ nixpkgs
, flake-utils
, ...
}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
# Place all toolchain components in a single directory for IntelliJ
rust-toolchain = pkgs.symlinkJoin {
name = "rust-toolchain";
paths = with pkgs; [
rustc
cargo
rustPlatform.rustcSrc
] ++ lib.optionals stdenv.isDarwin [
libiconv
darwin.apple_sdk.frameworks.SystemConfiguration
];
};
in
{
devShells.default = pkgs.mkShell {
name = "reddit-magnet";
buildInputs = with pkgs; [
cargo
cargo-machete
cargo-release
cargo-sort
openssl
pkg-config
rustc
rust-toolchain
] ++ lib.optionals stdenv.isDarwin [
libiconv
darwin.apple_sdk.frameworks.SystemConfiguration
];
RUST_BACKTRACE = 1;
};
});
}