liveterm/flake.nix

29 lines
838 B
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-01-07 18:31:39 -06:00
toolchain = pkgs.fenix.stable;
2023-01-07 17:36:11 -06: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-01-07 18:31:39 -06:00
packages = (with pkgs; [ cargo-watch cargo-deny cargo-edit ])
++ (with toolchain; [ cargo rustc rustfmt ]);
CARGO_UNSTABLE_SPARSE_REGISTRY = "true";
2023-01-07 17:36:11 -06:00
};
});
}