I am following the overlay docs on how to override a pkg version, but ti fails due to new dependencies added. The docs expect that to happen, but does not give any light on what to do from there!
For reference, this is how surrealist was updated the last time: surrealist: 1.11.7 -> 2.0.6 · NixOS/nixpkgs@dcd747d · GitHub
My research so far has indicated that I need to update the hash of the dependencies, both npm and cargo. How can I find the right dependencies hashes that need to be overridden?
Config
{ inputs, ... }:
{
nixpkgs.overlays = [
# The unstable nixpkgs set (declared in the flake inputs) will
# be accessible through 'pkgs.unstable'
(final: _prev: {
unstable = import inputs.nixpkgs-unstable {
system = final.system;
config.allowUnfree = true;
};
})
# https://nixos.wiki/wiki/Overlays#Overriding_a_package_inside_an_extensible_attribute_set
# https://nixos.wiki/wiki/Overlays#Overriding_a_version
(final: prev: {
unstable = prev.unstable.extend
(__final: __prev: {
surrealist = __prev.surrealist.overrideAttrs (oldAttrs: {
version = "2.1.6";
src = prev.fetchFromGitHub {
owner = "surrealdb";
repo = "surrealist";
rev = "surrealist-v2.1.6";
hash = "sha256-jOjOdrVOcGPenFW5mkkXKA64C6c+/f9KzlvtUmw6vXc=";
};
});
});
})
];
}
Error
[0.0 MiB DL] downloading 'https://github.com/nix-community/home-manager/archive/e1391fb22e18a36f57e6999c7a9f966dc
building the system configuration...
error: builder for '/nix/store/ycj0qq23p2lc81533jp0df3xqqi3sik1-surrealist-ui-2.1.6.drv' failed with exit code 1;
last 10 log lines:
> Scope: all 3 workspace projects
> Lockfile is up to date, resolution step is skipped
> Progress: resolved 1, reused 0, downloaded 0, added 0
> Packages: +809
>
> Progress: resolved 1, reused 0, downloaded 0, added 0
> Progress: resolved 809, reused 0, downloaded 0, added 0
> Progress: resolved 809, reused 14, downloaded 0, added 0
> ERR_PNPM_NO_OFFLINE_TARBALL A package is missing from the store but cannot download it in offline mode. The missing package may be downloaded from https://registry.npmjs.org/@codemirror/language/-/language-6.10.2.tgz.
> Progress: resolved 809, reused 14, downloaded 0, added 0
For full logs, run 'nix log /nix/store/ycj0qq23p2lc81533jp0df3xqqi3sik1-surrealist-ui-2.1.6.drv'.
error: 1 dependencies of derivation '/nix/store/8s3ib15ghqw2aarvn8dq0cvrpc4x4wf9-surrealist-2.1.6.drv' failed to build