steamux 0.1.0

Run multiple programs and interactive shells in one Proton's environment (Steam/umu-launcher)
Documentation
{
  description = "Run multiple programs and interactive shells in one Proton's environment (Steam/umu-launcher)";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    crane.url = "github:ipetkov/crane";
    flake-parts.url = "github:hercules-ci/flake-parts";
    rust-overlay = {
      url = "github:oxalica/rust-overlay";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs =
    inputs:
    inputs.flake-parts.lib.mkFlake { inherit inputs; } {
      systems = [ "x86_64-linux" ];

      perSystem =
        {
          self',
          system,
          pkgs,
          lib,
          ...
        }:
        let
          craneLib = (inputs.crane.mkLib pkgs).overrideToolchain (p:
            p.rust-bin.beta.latest.default.override {
              extensions = [ "rust-src" "rust-analyzer" ];
            }
          );

          commonArgs = {
            src = craneLib.cleanCargoSource ./.;
            strictDeps = true;
          };

          steamux = craneLib.buildPackage (
            commonArgs
            // {
              cargoArtifacts = craneLib.buildDepsOnly commonArgs;
            }
          );
        in
        {
          _module.args.pkgs = import inputs.nixpkgs {
            inherit system;
            overlays = [ (import inputs.rust-overlay) ];
          };

          checks = { inherit steamux; };

          packages = {
            inherit steamux;
            default = steamux;
          };

          apps = {
            steamux = {
              type = "app";
              program = lib.getExe steamux;
            };

            default = self'.apps.steamux;
          };

          devShells.default = craneLib.devShell {
            checks = self'.checks;
            inputsFrom = [ steamux ];
          };
        };
    };
}