diff options
author | Jacob Moody <moody@posixcafe.org> | 2023-06-27 19:23:10 -0500 |
---|---|---|
committer | Jacob Moody <moody@posixcafe.org> | 2023-06-29 09:32:51 -0500 |
commit | 635fd5f1610d5786e5acb27366c0172ffcc68efe (patch) | |
tree | aecb24006880356309438077e03d31cbfe3d916a /pkgs/shells/rc-9front | |
parent | da0a385a5e720b8dfb422e4f6a1c466b001e4089 (diff) |
rc-9front: init at 2022-11-01
Diffstat (limited to 'pkgs/shells/rc-9front')
-rw-r--r-- | pkgs/shells/rc-9front/default.nix | 45 | ||||
-rw-r--r-- | pkgs/shells/rc-9front/path.patch | 13 |
2 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/shells/rc-9front/default.nix b/pkgs/shells/rc-9front/default.nix new file mode 100644 index 0000000000000..9779e08885b84 --- /dev/null +++ b/pkgs/shells/rc-9front/default.nix @@ -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; + }; +} diff --git a/pkgs/shells/rc-9front/path.patch b/pkgs/shells/rc-9front/path.patch new file mode 100644 index 0000000000000..7deef2cebfcd0 --- /dev/null +++ b/pkgs/shells/rc-9front/path.patch @@ -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){ |