Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchFromGitHub, 4 rustPlatform, 5 versionCheckHook, 6}: 7 8rustPlatform.buildRustPackage rec { 9 pname = "rustcat"; 10 version = "3.0.0"; 11 12 src = fetchFromGitHub { 13 owner = "robiot"; 14 repo = "rustcat"; 15 tag = "v${version}"; 16 hash = "sha256-/6vNFh7n6WvYerrL8m9sgUKsO2KKj7/f8xc4rzHy9Io="; 17 }; 18 19 cargoHash = "sha256-76/JK9IKYD6mxMddUyTgKAw53GM4EUhC0NbKFKdg8CI="; 20 21 nativeInstallCheckInputs = [ versionCheckHook ]; 22 23 doInstallCheck = true; 24 25 versionCheckProgram = [ "${placeholder "out"}/bin/rcat" ]; 26 27 meta = { 28 description = "Port listener and reverse shell"; 29 homepage = "https://github.com/robiot/rustcat"; 30 changelog = "https://github.com/robiot/rustcat/releases/tag/v${version}"; 31 license = lib.licenses.mit; 32 maintainers = with lib.maintainers; [ fab ]; 33 mainProgram = "rcat"; 34 }; 35}