liveterm/flake.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

2023-01-07 17:36:11 -06:00
{
2023-01-07 18:31:39 -06:00
inputs = { fenix.url = "github:nix-community/fenix"; };
2023-01-07 17:36:11 -06:00
outputs = { self, nixpkgs, flake-utils, fenix }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ fenix.overlays.default ];
};
2023-02-10 22:56:46 -06:00
toolchain = pkgs.fenix.default;
2023-01-07 17:36:11 -06:00
2023-02-11 11:34:35 -06:00
flakePkgs = rec {
liveterm = pkgs.callPackage ./. { inherit toolchain; };
liveterm-docker = pkgs.dockerTools.buildImage {
name = "liveterm";
config = { Cmd = [ "${liveterm}/bin/liveterm" ]; };
};
2023-01-07 17:36:11 -06:00
};
in rec {
packages = flake-utils.lib.flattenTree flakePkgs;
2023-02-11 11:34:35 -06:00
defaultPackage = packages.liveterm;
2023-01-07 17:36:11 -06:00
devShell = pkgs.mkShell {
2023-02-11 11:34:35 -06:00
inputsFrom = with packages; [ liveterm ];
2023-02-10 22:18:09 -06:00
packages = (with pkgs; [
asciinema
cargo-watch
cargo-deny
cargo-edit
2023-02-10 22:56:46 -06:00
cargo-expand
2023-02-10 22:18:09 -06:00
# Get the nightly version of rustfmt so we can wrap comments
pkgs.fenix.default.rustfmt
2023-02-10 22:56:46 -06:00
]) ++ (with toolchain; [ cargo clippy rustc rustfmt ]);
2023-01-07 17:36:11 -06:00
};
});
}