-
-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect (?) hashes for sources in latest emacs-overlay #391
Comments
Upstream have bumped all file mtimes in the archive:
|
This happens to smartparens-mode.
|
Looks like the hash of smartparens in .json is wrong. |
Any resolution for this issue? |
So far, I've been cloning this repo, and manually changing the smartparens hash and using my local version... Is there a way we can correct this programmatically so we can keep getting proper updates and i don't have to do this manually? |
I think a (pkgs.emacsWithPackagesFromUsePackage {
config = ./emacs/init.el;
defaultInitFile = true;
package = pkgs.emacs-unstable;
alwaysEnsure = false;
alwaysTangle = true;
extraEmacsPackages = epkgs: with epkgs; [
treesit-grammars.with-all-grammars
];
override = final: prev: {
smartparens = prev.melpaPackages.smartparens.overrideAttrs(old: {
sha256 = "sha256-RnEhNvE0oZWP870M0oWy3z8qqk2ir00H1B+9NLCSTT0=";
});
}; Maybe the key is wrong? |
This issue is still present despite #397 being merged. |
It works here. |
just bumped my flake and smartparens is breaking my build |
Ditto here, the shasum that #397 fixed is entirely different from what I'm seeing causing issues:
|
I also see |
Flake lock file updates: • Updated input 'emacs-overlay': 'github:nix-community/emacs-overlay/bb943ccf9c2572550ddfdb7c92373c6671b870af' (2024-04-28) → 'github:nix-community/emacs-overlay/557a69764e1aeb16c3d0f7d53ff4c3001a4ccafc' (2024-04-20) Refs: nix-community/emacs-overlay#391 Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Can people please post what OS and Architecture they are using? This might be an issue with Darwin Vs Linux and/or X86 vs Arm. The hash I updated to in #397 was generated on aarch64-darwin. Testing this evening I got the original hash on x86_64-linux and aarch64-linux. |
I'm using Linux(NixOS), x86_64 and this is the hash I'm seeing: |
NixOS on x86_64, I get |
Smartparens-mode break again. Finally, I figure it out: (pkgs.emacsWithPackagesFromUsePackage {
config = ./emacs/init.el;
defaultInitFile = true;
package = pkgs.emacs-unstable;
alwaysEnsure = false;
alwaysTangle = true;
extraEmacsPackages = epkgs: with epkgs; [
treesit-grammars.with-all-grammars
];
override = final: prev: {
smartparens = prev.melpaPackages.smartparens.overrideAttrs(old: {
src = pkgs.fetchgit {
url = "https://github.com/Fuco1/smartparens";
rev = "a5c68cac1bea737b482a37aa92de4f6efbf7580b";
sha256 = "Tf8fY9n5mGcH+rQWhdDNu88Ak4us564d6HQF83cxDkU=";
};
});
}
// {
combobulate = pkgs.callPackage ./packages/combobulate/default.nix {
inherit (pkgs) fetchFromGitHub;
inherit (prev) trivialBuild;
};
};
# override = epkgs: epkgs
}) |
There is an issue[1] of incorrect source hashes in emacs-overlay. Last update[2] of MELPA packages in Nixpkgs is from emacs-overlay, which introduces that issue into Nixpkgs. This patch is a dirty workaround for that issue in Nixpkgs by manually fixing incorrect source hashes. Ideally, we should fix that issue properly in emacs-overlay so that future updates from the overlay do not need this workaround any more. Here is how I produce this patch: 1. Cherry-pick the update[2] to my system's Nixpkgs commit to avoid building many staging packages 2. Build sources for each elisp package set denoted as EPKGS. EPKGS can be elpaDevelPackages, elpaPackages, nongnuPackages, melpaStablePackages and melpaPackages. nix build --include nixpkgs=$PWD --file source-hash.nix <EPKGS> --keep-going 3. Check log for hash mismatch: error: hash mismatch in fixed-output derivation '/nix/store/lg6jmfbqmkp261dwk25ji9n8sxd180rm-source-vhdl-tools-20200330.1819.drv': specified: sha256-QsEah0IR5qIEv4Wng9VAfyBB47UC9SwoVfsGjvcbUz0= got: sha256-RMEah0IR5qIEv4Wng9VAfyBB47UC9SwoVfsGjvcbUz0= 4. Convert the correct hash if needed nix hash to-base32 sha256-RMEah0IR5qIEv4Wng9VAfyBB47UC9SwoVfsGjvcbUz0= Here is the source-hash.nix file: let pkgs = import <nixpkgs> { }; lib = pkgs.lib; mkSrcSet = epkgs: lib.mapAttrs ( name: package: package.src.overrideAttrs { name = "source-" + name + "-" + package.version; } ) (lib.filterAttrs (_: package: lib.isDerivation package && (package ? src)) epkgs); in { elpaDevelPackages = mkSrcSet pkgs.emacsPackages.elpaDevelPackages; elpaPackages = mkSrcSet pkgs.emacsPackages.elpaPackages; nongnuPackages = mkSrcSet pkgs.emacsPackages.nongnuPackages; melpaStablePackages = mkSrcSet pkgs.emacsPackages.melpaStablePackages; melpaPackages = mkSrcSet pkgs.emacsPackages.melpaPackages; } [1]: nix-community/emacs-overlay#391 [2]: NixOS#308258
There is an issue[1] of incorrect source hashes in emacs-overlay. Last update[2] of MELPA packages in Nixpkgs is from emacs-overlay, which introduces that issue into Nixpkgs. This patch is a dirty workaround for that issue in Nixpkgs by manually fixing incorrect source hashes. Ideally, we should fix that issue properly in emacs-overlay so that future updates from the overlay do not need this workaround any more. Here is how I produce this patch: 1. Cherry-pick the update[2] to my system's Nixpkgs commit to avoid building many staging packages 2. Build sources for each elisp package set denoted as EPKGS. EPKGS can be elpaDevelPackages, elpaPackages, nongnuPackages, melpaStablePackages and melpaPackages. nix build --include nixpkgs=$PWD --file source-hash.nix <EPKGS> --keep-going 3. Check log for hash mismatch: error: hash mismatch in fixed-output derivation '/nix/store/lg6jmfbqmkp261dwk25ji9n8sxd180rm-source-vhdl-tools-20200330.1819.drv': specified: sha256-QsEah0IR5qIEv4Wng9VAfyBB47UC9SwoVfsGjvcbUz0= got: sha256-RMEah0IR5qIEv4Wng9VAfyBB47UC9SwoVfsGjvcbUz0= 4. Convert the correct hash if needed nix hash to-base32 sha256-RMEah0IR5qIEv4Wng9VAfyBB47UC9SwoVfsGjvcbUz0= Here is the source-hash.nix file: let pkgs = import <nixpkgs> { }; lib = pkgs.lib; mkSrcSet = epkgs: lib.mapAttrs ( name: package: package.src.overrideAttrs { name = "source-" + name + "-" + package.version; } ) (lib.filterAttrs (_: package: lib.isDerivation package && (package ? src)) epkgs); in { elpaDevelPackages = mkSrcSet pkgs.emacsPackages.elpaDevelPackages; elpaPackages = mkSrcSet pkgs.emacsPackages.elpaPackages; nongnuPackages = mkSrcSet pkgs.emacsPackages.nongnuPackages; melpaStablePackages = mkSrcSet pkgs.emacsPackages.melpaStablePackages; melpaPackages = mkSrcSet pkgs.emacsPackages.melpaPackages; } [1]: nix-community/emacs-overlay#391 [2]: NixOS#308258
I think two different issues are discussed here. One issue is the incorrect source hash of org-9.6.24. The cause is that Another issue is that the source hash of smartparens on Linux is different from that on darwin. The cause of this issue needs further investigation. Note that this issue is not caused by upstream's change of file mtime in the tarball because To track one issue at a time, I think we should close this since the first issue has been fixed and file a separate issue for the second one. |
Hello. The same problem.
I looked in PR but didn't find this hash there. |
There are two different hash representations involved here:
Use |
For example, try building the source for
org
:This results in:
I've also seen this for exwm, maybe more packages are affected.The exwm problem seems to be in nixpkgs.The text was updated successfully, but these errors were encountered: