Merge pull request #240232 from majiru/add-rc-9front

rc-9front: init at unstable-2022-11-01
This commit is contained in:
Sandro 2023-06-30 17:07:22 +02:00 committed by GitHub
commit 21f23c8df5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 60 additions and 0 deletions

View file

@ -0,0 +1,45 @@
{
lib
, stdenv
, fetchgit
, byacc
, installShellFiles
}:
stdenv.mkDerivation rec {
pname = "rc-9front";
version = "unstable-2022-11-01";
src = fetchgit {
url = "git://shithub.us/cinap_lenrek/rc";
rev = "69041639483e16392e3013491fcb382efd2b9374";
hash = "sha256-xc+EfC4bc9ZA97jCQ6CGCzeLGf+Hx3/syl090/x4ew4=";
};
strictDeps = true;
nativeBuildInputs = [ byacc installShellFiles ];
patches = [ ./path.patch ];
buildPhase = ''
make PREFIX=$out
'';
installPhase = ''
install -Dm755 -t $out/bin/ rc
installManPage rc.1
mkdir -p $out/lib
install -m644 rcmain.unix $out/lib/rcmain
'';
passthru.shellPath = "/bin/rc";
meta = with lib; {
description = "The 9front shell";
longDescription = "unix port of 9front rc";
homepage = "http://shithub.us/cinap_lenrek/rc/HEAD/info.html";
license = licenses.mit;
maintainers = with maintainers; [ moody ];
mainProgram = "rc";
platforms = platforms.all;
};
}

View file

@ -0,0 +1,13 @@
diff --git a/rcmain.unix b/rcmain.unix
index 7ccbe1b..691f493 100644
--- a/rcmain.unix
+++ b/rcmain.unix
@@ -13,7 +13,7 @@ if(~ $rcname ?.out) prompt=('broken! ' ' ')
if(flag p) path=/bin
if not {
finit
- if(~ $#path 0) path=(. /bin /usr/bin /usr/local/bin)
+ if(~ $#path 0) path=`:{/usr/bin/env echo -n $PATH}
}
fn sigexit
if(! ~ $#cflag 0){

View file

@ -12003,6 +12003,8 @@ with pkgs;
rc = callPackage ../shells/rc { };
rc-9front = callPackage ../shells/rc-9front { };
rcon = callPackage ../tools/networking/rcon { };
rconc = callPackage ../tools/networking/rconc { };