test-with 0.7.1

A lib help you run test with condition
Documentation
{

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    rust-overlay.url = "github:oxalica/rust-overlay";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = { self, rust-overlay, nixpkgs, flake-utils }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        overlays = [ (import rust-overlay) ];
        pkgs = import nixpkgs {
          inherit system overlays;
        };
        rust = pkgs.rust-bin.nightly."2022-03-30".default;
        publishScript = pkgs.writeShellScriptBin "crate-publish" ''
          cd $1
          cargo login $2
          cargo publish
        '';
        featureTestScript = pkgs.writeShellScriptBin "feature-test" ''
          cargo install cargo-hack
          cargo hack test --each-feature --examples
        '';
      in
      with pkgs;
      {
        devShell = mkShell {
          buildInputs = [
            rust
            openssl
            pkg-config

            publishScript
            featureTestScript
          ];
          SAYING = ''
            The value of a man resides in what he gives
            and not in what he is capable of receiving.'';
        };
      }
    );
}