From d939536baa6dc0b83d3d267e952a15b2dd65ff65 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sat, 19 Aug 2023 21:46:10 -0300 Subject: [PATCH] rc: enable lineEditingLibrary --- pkgs/shells/rc/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/shells/rc/default.nix b/pkgs/shells/rc/default.nix index 422eb3d506ed..1e1e968e7333 100644 --- a/pkgs/shells/rc/default.nix +++ b/pkgs/shells/rc/default.nix @@ -1,16 +1,23 @@ { lib , stdenv , fetchFromGitHub +, pkgsStatic , byacc , ed , ncurses , readline , installShellFiles -, pkgsStatic , historySupport ? true , readlineSupport ? true +, lineEditingLibrary ? if (stdenv.hostPlatform.isDarwin + || stdenv.hostPlatform.isStatic) + then "null" + else "readline" }: +assert lib.elem lineEditingLibrary [ "null" "edit" "editline" "readline" "vrl" ]; +assert !(lib.elem lineEditingLibrary [ "edit" "editline" "vrl" ]); # broken +assert (lineEditingLibrary == "readline") -> readlineSupport; stdenv.mkDerivation (finalAttrs: { pname = "rc"; version = "unstable-2023-06-14"; @@ -59,6 +66,7 @@ stdenv.mkDerivation (finalAttrs: { "PREFIX=${placeholder "out"}" "MANPREFIX=${placeholder "man"}/share/man" "CPPFLAGS=\"-DSIGCLD=SIGCHLD\"" + "EDIT=${lineEditingLibrary}" ]; buildFlags = [ @@ -79,9 +87,9 @@ stdenv.mkDerivation (finalAttrs: { meta = { homepage = "https://github.com/rakitzis/rc"; description = "The Plan 9 shell"; - license = lib.licenses.zlib; + license = [ lib.licenses.zlib ]; + mainProgram = "rc"; maintainers = with lib.maintainers; [ ramkromberg AndersonTorres ]; platforms = lib.platforms.unix; - mainProgram = "rc"; }; })