Hi,
I am trying to use pkgsStatic.readline in my project, however upon installation of one, the process fails with the message:
make[1]: Leaving directory '/build/readline/doc'
( cd examples ; make DESTDIR=/nix/store/zwkyjp5mz0vb6nlqjrbbsa1lkgvdwqd3-gnureadlinemy install )
make[1]: Entering directory '/build/readline/examples'
/bin/sh ../support/mkdirs /nix/store/zwkyjp5mz0vb6nlqjrbbsa1lkgvdwqd3-gnureadlinemy/usr/local/share/readline
mkdir /nix/store/zwkyjp5mz0vb6nlqjrbbsa1lkgvdwqd3-gnureadlinemy/usr/local/share/readline
/nix/store/ahkfdxq8mcpsb5kvdvgqr1wv8zjngbh4-coreutils-9.1/bin/install: cannot stat './rltest2.c': No such file or directory
make[1]: Leaving directory '/build/readline/examples'
/nix/store/ahkfdxq8mcpsb5kvdvgqr1wv8zjngbh4-coreutils-9.1/bin/install -c -m 644 /build/readline/readline.pc /nix/store/zwkyjp5mz0vb6nlqjrbbsa1lkgvdwqd3-gnureadlinemy/usr/local/lib/pkgconfig/readline.pc
/nix/store/ahkfdxq8mcpsb5kvdvgqr1wv8zjngbh4-coreutils-9.1/bin/install -c -m 644 /build/readline/history.pc /nix/store/zwkyjp5mz0vb6nlqjrbbsa1lkgvdwqd3-gnureadlinemy/usr/local/lib/pkgconfig/history.pc
mv /nix/store/zwkyjp5mz0vb6nlqjrbbsa1lkgvdwqd3-gnureadlinemy/usr/local/lib/libreadline.a /nix/store/zwkyjp5mz0vb6nlqjrbbsa1lkgvdwqd3-gnureadlinemy/usr/local/lib/libreadline.old
mv: cannot stat '/nix/store/zwkyjp5mz0vb6nlqjrbbsa1lkgvdwqd3-gnureadlinemy/usr/local/lib/libreadline.a': No such file or directory
make: [Makefile:255: install-static] Error 1 (ignored)
/nix/store/ahkfdxq8mcpsb5kvdvgqr1wv8zjngbh4-coreutils-9.1/bin/install -c -m 644 libreadline.a /nix/store/zwkyjp5mz0vb6nlqjrbbsa1lkgvdwqd3-gnureadlinemy/usr/local/lib/libreadline.a
test -n "ranlib" && ranlib /nix/store/zwkyjp5mz0vb6nlqjrbbsa1lkgvdwqd3-gnureadlinemy/usr/local/lib/libreadline.a
mv /nix/store/zwkyjp5mz0vb6nlqjrbbsa1lkgvdwqd3-gnureadlinemy/usr/local/lib/libhistory.a /nix/store/zwkyjp5mz0vb6nlqjrbbsa1lkgvdwqd3-gnureadlinemy/usr/local/lib/libhistory.old
mv: cannot stat '/nix/store/zwkyjp5mz0vb6nlqjrbbsa1lkgvdwqd3-gnureadlinemy/usr/local/lib/libhistory.a': No such file or directory
make: [Makefile:258: install-static] Error 1 (ignored)
Actually, I tried to compile readline library directly from gnu git repository using the code below and got the same error (tried both nixos-unstable and 23.05, building on ubuntu 20.04)
export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz
{ pkgs ? import <nixpkgs> { system = builtins.currentSystem; }
, stdenv ? pkgs.stdenv
, fetchgit ? pkgs.fetchgit
}:
stdenv.mkDerivation rec {
name = "gnureadlinemy";
src = fetchgit {
url = "https://git.savannah.gnu.org/git/readline.git";
rev = "refs/tags/readline-8.2";
sha256 = "sha256-AT0WVrqbenjCFFo2mS/om3Y5jIRSJe4V8IEOyw324LM=";
};
nativeBuildInputs = with pkgs; [ automake libtool autoconf texinfo ];
buildInputs = with pkgs; [ ];
configurePhase = ''
./configure --enable-static --disable-shared
'';
installPhase = ''
make install DESTDIR=$out
'';
}
Guys, any advice on how to use/compile it? Thank you!