jftt/flake.nix

62 lines
1.5 KiB
Nix
Raw Normal View History

2024-10-20 22:19:05 +02:00
{
description = "jftt";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
crane.url = "github:ipetkov/crane";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.rust-analyzer-src.follows = "";
};
};
outputs = { self, nixpkgs, systems, crane, fenix, ... }: let
name = "jftt";
forEachSystem = nixpkgs.lib.genAttrs (import systems);
pkgsForEach = nixpkgs.legacyPackages;
in {
# packages = forEachSystem (
# system: let
# pkgs = pkgsForEach.${system};
# craneLib = (crane.mkLib pkgs).overrideToolchain (
# fenix.packages.${system}.complete.withComponents [
# "cargo"
# "rustc"
# "rust-src"
# ]
# );
# in {
# default = craneLib.buildPackage {
# pname = name;
# version = "0.1.0";
# src = craneLib.cleanCargoSource ./.;
# };
# }
# );
devShells = forEachSystem (
system: let
pkgs = pkgsForEach.${system};
in {
default = pkgs.mkShell {
inherit name;
packages = with pkgs; [
rust-analyzer
(fenix.packages.${system}.complete.withComponents [
"cargo"
"rustc"
"rust-src"
])
];
# inputsFrom = [ self.packages.${system}.default ];
};
}
);
};
}