Michael Zhang
99f5f8d9b2
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
36 lines
990 B
Nix
36 lines
990 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.default;
|
|
|
|
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; [
|
|
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 ]);
|
|
};
|
|
});
|
|
}
|