-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
I want to create a derivation from nixpkgs that will have the latest commit instead of the latest release tag. Here is a minimal example flake.nix:
{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs = {nixpkgs, ...}: {
packages.x86_64-linux.jay = let
pkgs = import nixpkgs {system = "x86_64-linux";}; in
pkgs.jay.overrideAttrs (finalAttrs: prevAttrs: {
version = "1.11.1";
src = pkgs.fetchFromGitHub {
owner = "mahkoh";
repo = "jay";
rev = "v1.11.1";
sha256 = "sha256-mm2bXxl9TaKwmeCwFz3IKznqjsfY8RKEVU/RK4zd63U=";
};
cargoHash = "sha256-T7053eAH3IqkAxNZpYHdC6Z7JZtArrOqGMjoIccjemI=";
});
};
}If I run nix-update jay -F, it will change the version, hash and rev, but not cargoHash, resulting in a failed build due to hash mismatch:
pkgs.jay.overrideAttrs (finalAttrs: prevAttrs: {
version = "1.11.1-unstable-2025-10-03";
src = pkgs.fetchFromGitHub {
owner = "mahkoh";
repo = "jay";
rev = "44ac0511c386fef9723dcbdce6119dd1f8f6c68c";
sha256 = "sha256-acAwoO2i4TynRID+7ipbH/X+MhPRmq8jnwyB5c8jWh0=";
};
cargoHash = "sha256-T7053eAH3IqkAxNZpYHdC6Z7JZtArrOqGMjoIccjemI=";
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels