engram 0.4.0

A fast and atomic version control system for portable file backups
{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
  };
  outputs =
    { self, nixpkgs }:
    let
      supportedSystems = [ "x86_64-linux" ];
      forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
      pkgs = import nixpkgs {
        system = "x86_64-linux";
      };
    in
    {
      packages = forAllSystems (system: {
        default =
          let
            manifest = (pkgs.lib.importTOML ./Cargo.toml).package;
          in
          pkgs.rustPlatform.buildRustPackage rec {
            pname = manifest.name;
            version = manifest.version;
            cargoLock.lockFile = ./Cargo.lock;
            src = pkgs.lib.cleanSource ./.;
            buildType = "release";
          };
      });
      devShells = forAllSystems (system: {
        default = pkgs.mkShell {
          nativeBuildInputs = with pkgs; [
            cargo
            rust-analyzer
            rustfmt
          ];
          RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
        };
      });
    };
}