liveterm/flake.nix
Michael Zhang b5d3e63807
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Test some docker push
2023-02-11 11:34:35 -06:00

41 lines
1.1 KiB
Nix

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