rc-9front: init at 2022-11-01

This commit is contained in:
Jacob Moody 2023-06-27 19:23:10 -05:00
parent da0a385a5e
commit 635fd5f161
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

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