brush: init at 0.2.15
This commit is contained in:
		
							parent
							
								
									c5119e3e5d
								
							
						
					
					
						commit
						be7b55de83
					
				
							
								
								
									
										68
									
								
								pkgs/by-name/br/brush/package.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								pkgs/by-name/br/brush/package.nix
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,68 @@
 | 
			
		||||
{
 | 
			
		||||
  lib,
 | 
			
		||||
  rustPlatform,
 | 
			
		||||
  fetchFromGitHub,
 | 
			
		||||
  versionCheckHook,
 | 
			
		||||
  testers,
 | 
			
		||||
  runCommand,
 | 
			
		||||
  writeText,
 | 
			
		||||
  nix-update-script,
 | 
			
		||||
  brush,
 | 
			
		||||
}:
 | 
			
		||||
 | 
			
		||||
rustPlatform.buildRustPackage rec {
 | 
			
		||||
  pname = "brush";
 | 
			
		||||
  version = "0.2.15";
 | 
			
		||||
 | 
			
		||||
  src = fetchFromGitHub {
 | 
			
		||||
    owner = "reubeno";
 | 
			
		||||
    repo = "brush";
 | 
			
		||||
    tag = "brush-shell-v${version}";
 | 
			
		||||
    hash = "sha256-hPF2nXYXAM+5Lz2VJw9vZ6RFZ40y+YkO94Jc/sLUYsg=";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  useFetchCargoVendor = true;
 | 
			
		||||
  cargoHash = "sha256-A4v4i6U6BwUMNTI/TO7wTQvNVtQYKGiQfDXOCy8hFTE=";
 | 
			
		||||
 | 
			
		||||
  nativeInstallCheckInputs = [
 | 
			
		||||
    versionCheckHook
 | 
			
		||||
  ];
 | 
			
		||||
  doInstallCheck = true;
 | 
			
		||||
  versionCheckProgram = "${placeholder "out"}/bin/${meta.mainProgram}";
 | 
			
		||||
  versionCheckProgramArg = [ "--version" ];
 | 
			
		||||
 | 
			
		||||
  # Found argument '--test-threads' which wasn't expected, or isn't valid in this context
 | 
			
		||||
  doCheck = false;
 | 
			
		||||
 | 
			
		||||
  passthru = {
 | 
			
		||||
    tests = {
 | 
			
		||||
      complete = testers.testEqualContents {
 | 
			
		||||
        assertion = "brushinfo performs to inspect completions";
 | 
			
		||||
        expected = writeText "expected" ''
 | 
			
		||||
          brush
 | 
			
		||||
          brushctl
 | 
			
		||||
          brushinfo
 | 
			
		||||
        '';
 | 
			
		||||
        actual =
 | 
			
		||||
          runCommand "actual"
 | 
			
		||||
            {
 | 
			
		||||
              nativeBuildInputs = [ brush ];
 | 
			
		||||
            }
 | 
			
		||||
            ''
 | 
			
		||||
              brush -c 'brushinfo complete line bru' >$out
 | 
			
		||||
            '';
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    updateScript = nix-update-script { extraArgs = [ "--version-regex=brush-shell-v([\\d\\.]+)" ]; };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  meta = {
 | 
			
		||||
    description = "Bash/POSIX-compatible shell implemented in Rust";
 | 
			
		||||
    homepage = "https://github.com/reubeno/brush";
 | 
			
		||||
    changelog = "https://github.com/reubeno/brush/blob/${src.tag}/CHANGELOG.md";
 | 
			
		||||
    license = lib.licenses.mit;
 | 
			
		||||
    maintainers = with lib.maintainers; [ kachick ];
 | 
			
		||||
    mainProgram = "brush";
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user