liveterm/flake.nix

37 lines
990 B
Nix
Raw Normal View History

2023-01-07 23:36:11 +00:00
{
2023-01-08 00:31:39 +00:00
inputs = { fenix.url = "github:nix-community/fenix"; };
2023-01-07 23:36: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-02-11 04:56:46 +00:00
toolchain = pkgs.fenix.default;
2023-01-07 23:36:11 +00:00
flakePkgs = {
asciinema = pkgs.callPackage ./. { inherit toolchain; };
};
in rec {
packages = flake-utils.lib.flattenTree flakePkgs;
defaultPackage = packages.asciinema;
devShell = pkgs.mkShell {
inputsFrom = with packages; [ asciinema ];
2023-02-11 04:18:09 +00:00
packages = (with pkgs; [
asciinema
cargo-watch
cargo-deny
cargo-edit
2023-02-11 04:56:46 +00:00
cargo-expand
2023-02-11 04:18:09 +00:00
# Get the nightly version of rustfmt so we can wrap comments
pkgs.fenix.default.rustfmt
2023-02-11 04:56:46 +00:00
]) ++ (with toolchain; [ cargo clippy rustc rustfmt ]);
2023-01-07 23:36:11 +00:00
};
});
}