Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ fetchurl, lib, stdenv, bash, perl }: 2 3stdenv.mkDerivation rec { 4 pname = "rush"; 5 version = "2.3"; 6 7 src = fetchurl { 8 url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz"; 9 sha256 = "sha256-57gBYfZsKdK1moXBC52KgxKv/MIeQK6tDu+fznXLZ+Y="; 10 }; 11 12 strictDeps = true; 13 buildInputs = [ bash ]; 14 15 postInstall = '' 16 substituteInPlace $out/bin/rush-po \ 17 --replace "exec perl" "exec ${lib.getExe perl}" 18 ''; 19 20 doCheck = true; 21 22 meta = { 23 broken = stdenv.isDarwin; 24 description = "Restricted User Shell"; 25 26 longDescription = 27 '' GNU Rush is a Restricted User Shell, designed for sites 28 providing limited remote access to their resources, such as 29 svn or git repositories, scp, or the like. Using a 30 sophisticated configuration file, Rush gives you complete 31 control over the command lines that users execute, as well as 32 over the usage of system resources, such as virtual memory, 33 CPU time, etc. 34 35 In particular, it allows remote programs to be run in a chrooted 36 environment, which is important with such programs as 37 sftp-server or scp, that lack this ability. 38 ''; 39 40 homepage = "https://www.gnu.org/software/rush/"; 41 license = lib.licenses.gpl3Plus; 42 43 maintainers = [ ]; 44 platforms = lib.platforms.all; 45 }; 46 47 passthru = { 48 shellPath = "/bin/rush"; 49 }; 50}