liveterm/flake.nix

42 lines
1.1 KiB
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
2023-02-11 17:34:35 +00:00
flakePkgs = rec {
liveterm = pkgs.callPackage ./. { inherit toolchain; };
liveterm-docker = pkgs.dockerTools.buildImage {
name = "liveterm";
config = { Cmd = [ "${liveterm}/bin/liveterm" ]; };
};
2023-01-07 23:36:11 +00:00
};
in rec {
packages = flake-utils.lib.flattenTree flakePkgs;
2023-02-11 17:34:35 +00:00
defaultPackage = packages.liveterm;
2023-01-07 23:36:11 +00:00
devShell = pkgs.mkShell {
2023-02-11 17:34:35 +00:00
inputsFrom = with packages; [ liveterm ];
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
};
});
}