Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 67 lines 1.8 kB view raw
1{ 2 fetchurl, 3 lib, 4 stdenv, 5 bash, 6 perl, 7 nixosTests, 8}: 9 10stdenv.mkDerivation rec { 11 pname = "rush"; 12 version = "2.4"; 13 14 src = fetchurl { 15 url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz"; 16 sha256 = "sha256-Jm80iJq2pwO/CJCItSN8gUo5ThxRQsG0Z5TYVtWSEts="; 17 }; 18 19 strictDeps = true; 20 buildInputs = [ bash ]; 21 22 # Make sure that Rush looks for rush.rc in a directory that users can 23 # modify easily. 24 configureFlags = [ "--sysconfdir=/etc" ]; 25 # Prevent “make install” from trying to copy something to 26 # /etc/rush.rc. 27 installFlags = [ "sysconfdir=$(out)/etc" ]; 28 postInstall = '' 29 substituteInPlace $out/bin/rush-po \ 30 --replace "exec perl" "exec ${lib.getExe perl}" 31 ''; 32 33 doCheck = true; 34 35 meta = { 36 mainProgram = "rush"; 37 broken = stdenv.hostPlatform.isDarwin; 38 description = "Restricted User Shell"; 39 40 longDescription = '' 41 GNU Rush is a Restricted User Shell, designed for sites 42 providing limited remote access to their resources, such as 43 svn or git repositories, scp, or the like. Using a 44 sophisticated configuration file, Rush gives you complete 45 control over the command lines that users execute, as well as 46 over the usage of system resources, such as virtual memory, 47 CPU time, etc. 48 49 In particular, it allows remote programs to be run in a chrooted 50 environment, which is important with such programs as 51 sftp-server or scp, that lack this ability. 52 ''; 53 54 homepage = "https://www.gnu.org/software/rush/"; 55 license = lib.licenses.gpl3Plus; 56 platforms = lib.platforms.all; 57 58 maintainers = with lib.maintainers; [ 59 c4f3z1n 60 ]; 61 }; 62 63 passthru = { 64 shellPath = "/bin/rush"; 65 tests = { inherit (nixosTests) rush; }; 66 }; 67}