diff options
Diffstat (limited to 'src/nix')
-rw-r--r-- | src/nix/local.mk | 4 | ||||
-rw-r--r-- | src/nix/repl.cc | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/nix/local.mk b/src/nix/local.mk index 21f190e47..e71cf16fa 100644 --- a/src/nix/local.mk +++ b/src/nix/local.mk @@ -6,6 +6,8 @@ nix_SOURCES := $(wildcard $(d)/*.cc) nix_LIBS = libexpr libmain libstore libutil libformat -nix_LDFLAGS = -lreadline +ifeq ($(HAVE_READLINE), 1) + nix_LDFLAGS += -lreadline +endif $(eval $(call install-symlink, nix, $(bindir)/nix-hash)) diff --git a/src/nix/repl.cc b/src/nix/repl.cc index 17203d3c2..13488bf1d 100644 --- a/src/nix/repl.cc +++ b/src/nix/repl.cc @@ -1,3 +1,5 @@ +#if HAVE_LIBREADLINE + #include <iostream> #include <cstdlib> @@ -726,3 +728,5 @@ struct CmdRepl : StoreCommand static RegisterCommand r1(make_ref<CmdRepl>()); } + +#endif |