diff --git a/pkgs/shells/oil/default.nix b/pkgs/shells/oil/default.nix index 654476bd5ae..1f6c7b70dc7 100644 --- a/pkgs/shells/oil/default.nix +++ b/pkgs/shells/oil/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, readline }: +{ stdenv, lib, fetchurl, withReadline ? true, readline }: stdenv.mkDerivation rec { pname = "oil"; @@ -17,8 +17,8 @@ stdenv.mkDerivation rec { mkdir -p $out/bin ''; - buildInputs = [ readline ]; - configureFlags = [ "--with-readline" ]; + buildInputs = lib.optional withReadline readline; + configureFlags = lib.optional withReadline "--with-readline"; # Stripping breaks the bundles by removing the zip file from the end. dontStrip = true;