Hi, for some reason when I change my nixpkgs url to nixos-23.05 I am getting hash missmatch error for my dwm, st and dmenu builds. The hashes of each patch are the ones returned by nix-prefetch-url
and I am successfully able to manually build packages by downloading tarball and applying patches manually but when I try to do rebuild I get hash missmathes with each rebuild pointing to different patch hash being wrong and the original hash not even being correct one. Commenting out patches makes build pass successfully. Removing my getpatch
and using plain fetchpatch
does nothing.
Errors returned
building the system configuration...
warning: Git tree '/home/ivan/.config/dotfiles' is dirty
error: hash mismatch in fixed-output derivation '/nix/store/f1kxcny0pawhimvfywm1ri25kq8bfzgb-dwm-restartsig-20180523-6.2.diff.drv':
specified: sha256-x08vQdpVKwyGKd25/se0CgNVgQQc8ZjYGkPUsWt0L2k=
got: sha256-OEvtUpbXZrAC/jlcjxigfCQIGYTnr9kFnXOUi7Xzc2k=
error: 1 dependencies of derivation '/nix/store/4wsp1z6a7s45ydxbyscf99pjbjr0gnb6-dwm-6.4.drv' failed to build
error: 1 dependencies of derivation '/nix/store/al0l5k1kw565c0j1ms9pn54jirz94c9g-man-paths.drv' failed to build
error: 1 dependencies of derivation '/nix/store/qkws6s6spyx17jc98vv1mnd2cmg9dhxw-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/g888imi31hsl3giwb8sw56zh6ndlvvy0-nixos-system-nixos-23.05.20230604.e7603eb.drv' failed to build
building the system configuration...
warning: Git tree '/home/ivan/.config/dotfiles' is dirty
error: hash mismatch in fixed-output derivation '/nix/store/m9dd1aw41zl41s1g6xi5rbvy7mvd02is-st-anysize-20220718-baa9357.diff.drv':
specified: sha256-eO8MEPRb3uaCTtBznG+LaojXqlcj4eT422rQgpxopfo=
got: sha256-yx9VSwmPACx3EN3CAdQkxeoJKJxQ6ziC9tpBcoWuWHc=
error: 1 dependencies of derivation '/nix/store/wbg6b9icjw9zh4inard3nflpapmlcisw-st-0.9.drv' failed to build
error: 1 dependencies of derivation '/nix/store/al0l5k1kw565c0j1ms9pn54jirz94c9g-man-paths.drv' failed to build
error: 1 dependencies of derivation '/nix/store/qkws6s6spyx17jc98vv1mnd2cmg9dhxw-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/g888imi31hsl3giwb8sw56zh6ndlvvy0-nixos-system-nixos-23.05.20230604.e7603eb.drv' failed to build
building the system configuration...
warning: Git tree '/home/ivan/.config/dotfiles' is dirty
error: hash mismatch in fixed-output derivation '/nix/store/zf805i65vvplbw19vfhzgxfz3vqdfw92-dwm-noborderfloatingfix-6.2.diff.drv':
specified: sha256-osxrOsizPhOpQ1a+tDPMbmKsjvA+FMC8ZwbfiINnnYQ=
got: sha256-CrKItgReKz3G0mEPYiqCHW3xHl6A3oZ0YiQ4oI9KXSw=
error: 1 dependencies of derivation '/nix/store/4wsp1z6a7s45ydxbyscf99pjbjr0gnb6-dwm-6.4.drv' failed to build
error: 1 dependencies of derivation '/nix/store/al0l5k1kw565c0j1ms9pn54jirz94c9g-man-paths.drv' failed to build
error: 1 dependencies of derivation '/nix/store/qkws6s6spyx17jc98vv1mnd2cmg9dhxw-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/g888imi31hsl3giwb8sw56zh6ndlvvy0-nixos-system-nixos-23.05.20230604.e7603eb.drv' failed to build
The custom packages are:
dwm
# ../packages/dwm.nix
{ dwm, fetchpatch }:
dwm.override {
patches = let
getpatch = path: sha256:
fetchpatch {
inherit sha256;
url = "https://dwm.suckless.org/patches/${path}";
};
in [
# Hide borders when single window is visible
(getpatch
"noborder/dwm-noborderfloatingfix-6.2.diff"
"114xcy1qipq6cyyc051yy27aqqkfrhrv9gjn8fli6gmkr0x6pk52")
# Allow restarting dwm
(getpatch
"restartsig/dwm-restartsig-20180523-6.2.diff"
"0s9gfimv3m233bc9iw8w0j0ma0qank3zxffx5630qasmv90jyky7")
# Proper full screen that hides bar
(getpatch
"actualfullscreen/dwm-actualfullscreen-20211013-cb3f58a.diff"
"0882k8w6651c18ina0245b558f1bvqydcycw07lp711hpbg7f9gv")
# Focus on net active is used in emacs to control frames and by emacs-everywhere
(getpatch
"focusonnetactive/dwm-focusonnetactive-6.2.diff"
"1yznv9mpyjjrhhh42jvi8m8vq6c9shiyzshigrcjwf0c13l9d87w")
# Font, colors and keybindings
../patches/dwm/config.def.h.diff
];
}
dmenu
# packages/dmenu.nix
{ dmenu, gawk, fetchurl, fetchpatch }:
dmenu.overrideAttrs (oldAttrs:
let
dmenu_run_history = fetchurl {
url = "http://tools.suckless.org/dmenu/scripts/dmenu_run_with_command_history/dmenu_run_history";
sha256 = "02fz6i391f6c1f39p0r8p37rbfqfsj3m0w0ylzv857w0w4ibhsp4";
};
in rec {
patches = let
getpatch = path: sha256:
fetchpatch {
inherit sha256;
url = "https://tools.suckless.org/dmenu/patches/${path}";
};
in [
# Fuzzy matching
(getpatch
"fuzzymatch/dmenu-fuzzymatch-4.9.diff"
"0yababzi655mhpgixzgbca2hjckj16ykzj626zy4i0sirmcyg8fr")
# Allow adjusting line height
(getpatch
"line-height/dmenu-lineheight-5.2.diff"
"0jabb2ycfn3xw0k2d2rv7nyas5cwjr6zvwaffdn9jawh62c50qy5")
# Show number of total/matched results
(getpatch
"numbers/dmenu-numbers-20220512-28fb3e2.diff"
"0b3xpky2xkfs7s466dbjrqyw5n9wnk1cca18iw1zbp7mwrp2cw3m")
# Font, and line height
../patches/dmenu/config.def.h.diff
];
# dmenu run with history does not need dmenu_path - remove it
# Moved sed replacement from postPatch to postInstall since postPatch
# is run before postInstall and updated dmenu_run is not yet available.
# There has to be a nicer way to do this but I am too lazy to figure it and
# this just works
postPatch = null;
postInstall = ''
cp ${dmenu_run_history} $out/bin/dmenu_run
sed -ri -e 's!\<(dmenu|stest)\>!'"$out/bin"'/&!g' $out/bin/dmenu_run
sed -ri -e 's!\<(awk)\>!'"${gawk}/bin"'/&!g' $out/bin/dmenu_run
rm $out/bin/dmenu_path
'';
})
st
# packages/st.nix
{ st, fetchpatch }:
st.override {
# st.overrideAttrs (_: rec {
patches = let
getpatch = path: sha256:
fetchpatch {
inherit sha256;
url = "https://st.suckless.org/patches/${path}";
};
in [
# Anysize to work properly with tiling WM's that respect hints
(getpatch
"anysize/st-anysize-20220718-baa9357.diff"
"1ym5d2f85l3avgwf9q93aymdg23aidprqwyh9s1fdpjvyh80rvvq")
# Bold is not bright
(getpatch
"bold-is-not-bright/st-bold-is-not-bright-20190127-3be4cf1.diff"
"1cpap2jz80n90izhq5fdv2cvg29hj6bhhvjxk40zkskwmjn6k49j")
# Scrollback with additions to allow scrolling with just mouse wheel
(getpatch
"scrollback/st-scrollback-20210507-4536f46.diff"
"072icbmj7my4c134d5apqw7v9q88vcrp6v6gdzf3668dzpkz9n0r")
(getpatch
"scrollback/st-scrollback-mouse-20220127-2c5edf2.diff"
"0xjg9gyd3ag68srhs7fsjs8yp8sp2srhmjq7699i207bpz6rpb26")
(getpatch
"scrollback/st-scrollback-mouse-altscreen-20220127-2c5edf2.diff"
"078hk7k5i0vc2x4dyb65dxd5ykr32pz4f4j6h0f7pm8j7xl1fbwg")
# Font, colors and keybindings
../patches/st/config.def.h.diff
];
}