{
  description = "Rustup";
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    rust-overlay.url = "github:oxalica/rust-overlay";
  };
  outputs = inputs @ {...}: let
    additionalPackages = [
      pkgs.cowsay
      pkgs.just
      pkgs.nasm
      pkgs.qemu
      pkgs.xorriso
    ];
    pkgs = import inputs.nixpkgs {
      system = "x86_64-linux";
      overlays = [(import inputs.rust-overlay)];
    };
    rustup = {
      package = pkgs.rustup;
      path = "${pkgs.rustup}/lib/rustlib.src/rust/library";
    };
  in {
    devShell.x86_64-linux = pkgs.mkShell {
      packages = [
        additionalPackages
        rustup.package
      ];
      shellHook = ''
        echo "Run 'exit' if you don't see something cowsaid." &&
        export RUST_SRC_PATH=rustup.path &&
        rustup default nightly &&
        rustup component add rust-src &&
        rustup component add rust-analyzer &&
        export PS1='\h@\[\e[30;48;5;202;1m\]rustboot\[\e[0m\]|\w\\$ ' &&
        cowsay "Welcome to rust-boot! Run 'just' to build and 'just run' to launch QEMU!"
      '';
    };
  };
}
