Merge pull request #152020 from KAction/static/rc

rc: fix static build
This commit is contained in:
superherointj 2022-09-19 17:14:03 -03:00 committed by GitHub
commit d9b362c589
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook, byacc
, ncurses, readline
, ncurses, readline, pkgsStatic
, historySupport ? false, readlineSupport ? true }:
stdenv.mkDerivation rec {
@ -20,6 +20,8 @@ stdenv.mkDerivation rec {
buildInputs = [ ncurses ]
++ lib.optionals readlineSupport [ readline ];
CPPFLAGS = ["-DSIGCLD=SIGCHLD"];
configureFlags = [
"--enable-def-interp=${stdenv.shell}" #183
] ++ lib.optionals historySupport [ "--with-history" ]
@ -31,7 +33,10 @@ stdenv.mkDerivation rec {
--replace "$(git describe || echo '(git description unavailable)')" "${builtins.substring 0 7 src.rev}"
'';
passthru.shellPath = "/bin/rc";
passthru = {
shellPath = "/bin/rc";
tests.static = pkgsStatic.rc;
};
meta = with lib; {
description = "The Plan 9 shell";