[Nix-dev] override buildInputs

Dario Bertini berdario at gmail.com
Thu Apr 9 20:17:07 CEST 2015


Hi, I'm trying to override some buildInputs in my
~/.nixpkgs/config.nix but it fails to pick up the new dependencies.

this is my config.nix

{
  packageOverrides = pkgs: rec {
    libpcap = pkgs.libpcap.override {
      src = pkgs.fetchurl {
        url = "http://www.tcpdump.org/release/libpcap-1.4.0.tar.gz";
        sha256 =
"7c6a2a4f71e8ab09804e6b4fb3aff998c5583108ac42c0e2967eee8e1dbc7406";
      };
    };
    socat = pkgs.stdenv.lib.overrideDerivation pkgs.socat (oldAttrs: {
      buildInputs = [pkgs.openssl pkgs.readline ];
    });
  };
}

I know it works, because the changes to libpcap are being picked up correctly

If I apply the same buildInputs change in my nixpkgs clone, the new
dependencies are picked up correctly, and socat is built with support
for readline

but here, it's not... what's even weirder is that if I change the
buildInputs to [], the socat I get still has support for TLS

I'd like to try to see what's the difference between the 2, by opening
a nix-shell and go through the steps on each environment, but if I try
to

nix-shell -f ~/nixpkgs -iA socat

I get this error:

error: Package ‘VisualBoyAdvance-1.7.2’ in
‘/home/dario/nixpkgs/pkgs/misc/emulators/VisualBoyAdvance/default.nix:18’
is marked as broken, refusing to evaluate.
For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.
For `nix-env` you can add
  { allowBroken = true; }
to ~/.nixpkgs/config.nix.


...and I'm already yak-shaving plenty of things for now

anyhow, I also checked with ldd, and I confirm that readline hasn't
been linked in the socat that I got in the other shell


I tried to check the Makefile that is generated after the configure step:

grep readline socat-1.7.3.0/Makefile
    xio-progcall.c xio-exec.c xio-system.c xio-termios.c xio-readline.c \
    xio-system.h xio-termios.h xio-readline.h \
SHFILES = daemon.sh mail.sh ftp.sh readline.sh \
TESTFILES = test.sh socks4echo.sh proxyecho.sh gatherinfo.sh readline-test.sh \

but this doesn't seem to be relevant, since i get the same even if
readline is not in the buildInputs... so the problem seems to be
before the configurePhase?

Thank you


More information about the nix-dev mailing list