
Cargo 1.84.0 seems to have changed the output format of cargo vendor again, once again invalidating fetchCargoTarball FOD hashes. It's time to fix this once and for all, switching across the board to fetchCargoVendor, which is not dependent on cargo vendor's output format. It should be possible to reproduce this diff. To do so, get the list of files changed by this commit, e.g. with git diff --name-only, then run the following two commands, each with that list of files as their standard input: xargs sed -i 's/^\(. *\)\(cargoHash\)\b/\1useFetchCargoVendor = true;\n\1cargoHash/' cut -d / -f 4 | xargs -n 1 nix-update --version=skip This will take a long time. It might be possible to parallelize it using xargs' -P option. I haven't tested it.
69 lines
1.7 KiB
Nix
69 lines
1.7 KiB
Nix
{
|
|
fetchzip,
|
|
lib,
|
|
rustPlatform,
|
|
git,
|
|
installShellFiles,
|
|
versionCheckHook,
|
|
nix-update-script,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "helix";
|
|
version = "25.01.1";
|
|
|
|
# This release tarball includes source code for the tree-sitter grammars,
|
|
# which is not ordinarily part of the repository.
|
|
src = fetchzip {
|
|
url = "https://github.com/helix-editor/helix/releases/download/${version}/helix-${version}-source.tar.xz";
|
|
hash = "sha256-rN2eK+AoyDH+tL3yxTRQQQYHf0PoYK84FgrRwm/Wfjk=";
|
|
stripRoot = false;
|
|
};
|
|
|
|
useFetchCargoVendor = true;
|
|
cargoHash = "sha256-JZwURUMUnwc3tzAsN7NJCE8106c/4VgZtHHA3e/BsXs=";
|
|
|
|
nativeBuildInputs = [
|
|
git
|
|
installShellFiles
|
|
];
|
|
|
|
env.HELIX_DEFAULT_RUNTIME = "${placeholder "out"}/lib/runtime";
|
|
|
|
postInstall = ''
|
|
# not needed at runtime
|
|
rm -r runtime/grammars/sources
|
|
|
|
mkdir -p $out/lib
|
|
cp -r runtime $out/lib
|
|
installShellCompletion contrib/completion/hx.{bash,fish,zsh}
|
|
mkdir -p $out/share/{applications,icons/hicolor/256x256/apps}
|
|
cp contrib/Helix.desktop $out/share/applications
|
|
cp contrib/helix.png $out/share/icons/hicolor/256x256/apps
|
|
'';
|
|
|
|
nativeInstallCheckInputs = [
|
|
versionCheckHook
|
|
];
|
|
versionCheckProgram = "${placeholder "out"}/bin/hx";
|
|
versionCheckProgramArg = [ "--version" ];
|
|
doInstallCheck = true;
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
description = "Post-modern modal text editor";
|
|
homepage = "https://helix-editor.com";
|
|
changelog = "https://github.com/helix-editor/helix/blob/${version}/CHANGELOG.md";
|
|
license = lib.licenses.mpl20;
|
|
mainProgram = "hx";
|
|
maintainers = with lib.maintainers; [
|
|
danth
|
|
yusdacra
|
|
zowoq
|
|
];
|
|
};
|
|
}
|