{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    nci = {
      url = "github:yusdacra/nix-cargo-integration";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    parts.url = "github:hercules-ci/flake-parts";
    parts.inputs.nixpkgs-lib.follows = "nixpkgs";
  };

  outputs = inputs @ {
    parts,
    nci,
    ...
  }:
    parts.lib.mkFlake {inherit inputs;} {
      systems = ["x86_64-linux"];
      imports = [nci.flakeModule];
      perSystem = {
        pkgs,
        config,
        ...
      }: let
        crateName = "pijui";
        crateOutputs = config.nci.outputs.${crateName};

        shellDeps = with pkgs; [
          rust-analyzer
        ];
      in {
        nci.projects.${crateName}.path = ./.;
        nci.crates.${crateName} = {
          export = true;
        };
        devShells.default = crateOutputs.devShell.overrideAttrs (old: {
          packages = (old.packages or []) ++ shellDeps;
        });
        packages.default = crateOutputs.packages.release;
      };
    };
}