mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
51 lines
1.4 KiB
Nix
51 lines
1.4 KiB
Nix
{ fetchurl, lib, stdenv, bash, perl }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "rush";
|
|
version = "2.3";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
|
|
sha256 = "sha256-57gBYfZsKdK1moXBC52KgxKv/MIeQK6tDu+fznXLZ+Y=";
|
|
};
|
|
|
|
strictDeps = true;
|
|
buildInputs = [ bash ];
|
|
|
|
postInstall = ''
|
|
substituteInPlace $out/bin/rush-po \
|
|
--replace "exec perl" "exec ${lib.getExe perl}"
|
|
'';
|
|
|
|
doCheck = true;
|
|
|
|
meta = {
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
description = "Restricted User Shell";
|
|
|
|
longDescription =
|
|
'' GNU Rush is a Restricted User Shell, designed for sites
|
|
providing limited remote access to their resources, such as
|
|
svn or git repositories, scp, or the like. Using a
|
|
sophisticated configuration file, Rush gives you complete
|
|
control over the command lines that users execute, as well as
|
|
over the usage of system resources, such as virtual memory,
|
|
CPU time, etc.
|
|
|
|
In particular, it allows remote programs to be run in a chrooted
|
|
environment, which is important with such programs as
|
|
sftp-server or scp, that lack this ability.
|
|
'';
|
|
|
|
homepage = "https://www.gnu.org/software/rush/";
|
|
license = lib.licenses.gpl3Plus;
|
|
|
|
maintainers = [ ];
|
|
platforms = lib.platforms.all;
|
|
};
|
|
|
|
passthru = {
|
|
shellPath = "/bin/rush";
|
|
};
|
|
}
|