I’m using overlays both in /etc/nixos/configuration.nix
and both in my ~/.config/nixpkgs/overlays
. I have the suspicion that the user defined overlays are not applied when I run nix-channel --update &&
nix-env --upgrade`. Here is why:
When I run nixos-rebuild --upgrade
, from time to time I can see that a certain derivation I patch in a system overlay is being rebuilt - I think it’s because one of it’s dependency got updated.
For reference, here it is.
# Patches that fix a bug with multiple simultaneout connections generating
# duplicate entries in resolv.conf
# https://lists.01.org/pipermail/connman/2019-April/023424.html
(
self: super: {
connman = super.connman.overrideAttrs (oldAttrs: rec {
patches = [
./connman-resolv.conf-duplicates.1.patch
./connman-resolv.conf-duplicates.2.patch
];
});
}
)
In comparison, I have many more overlays for my user environment, and some of them include patches and I never got to see them rebuilt - ever since I got wrote them and tested them with nix-env -iA
and nix-build -A
.
Here's an example overlay.
self: super:
{
octave = super.octave.overrideAttrs (oldAttrs: rec {
buildInputs = with super; [ gfortran readline ncurses perl flex texinfo qhull
graphicsmagick pcre pkgconfig fltk zlib curl openblas libsndfile fftw
fftwSinglePrec portaudio qrupdate arpack libwebp
# ----------
# my removal
# qt
# qscintilla
# ----------
#
# This is commented along with --enable-jit because of:
# - https://savannah.gnu.org/bugs/?func=detailitem&item_id=55469
# - https://savannah.gnu.org/bugs/?func=detailitem&item_id=55492
# - https://savannah.gnu.org/bugs/?func=detailitem&item_id=46192
# llvm_8
ghostscript
hdf5
glpk
suitesparse
openjdk11
gnuplot
python37
libGLU
xorg.libX11
# ----------
# My Addition
sundials
# ----------
];
configureFlags =
[ "--enable-readline"
"--enable-dl"
"--with-blas=openblas"
"--with-lapack=openblas"
"--enable-64"
# "--enable-jit"
];
});
}
I have installed it via nix-env -iA octave
and the build took a few hours but it worked eventually. What makes me suspicious is the fact I can’t recall any other time it got the build during a nix-env --upgrade
, and I wrote this overlay back in August. Is this normal? I can hardly believe it maybe got rebuild and I didn’t noticed it - it takes hours for the build to complete…
Moreover, what’s suspicious to me is the fact that if I run nix-env -iA nixpkgs.octave
now, I can see it start building.