liveterm/flake.nix
2023-01-07 18:31:39 -06:00

28 lines
838 B
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.stable;
flakePkgs = {
asciinema = pkgs.callPackage ./. { inherit toolchain; };
};
in rec {
packages = flake-utils.lib.flattenTree flakePkgs;
defaultPackage = packages.asciinema;
devShell = pkgs.mkShell {
inputsFrom = with packages; [ asciinema ];
packages = (with pkgs; [ cargo-watch cargo-deny cargo-edit ])
++ (with toolchain; [ cargo rustc rustfmt ]);
CARGO_UNSTABLE_SPARSE_REGISTRY = "true";
};
});
}