Files
nixpkgs/pkgs/by-name/hy/hyx/package.nix
2026-02-07 11:44:30 +01:00

34 lines
819 B
Nix

{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "hyx";
version = "2026.01.11";
src = fetchurl {
url = "https://yx7.cc/code/hyx/hyx-${lib.replaceStrings [ "-" ] [ "." ] finalAttrs.version}.tar.xz";
hash = "sha256-VQhjyeaiwOJhjBalYsjumV6IwdMOYqv99Oy4GbPE31Q=";
};
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace Makefile \
--replace "-Wl,-z,relro,-z,now -fpic -pie" ""
'';
installPhase = ''
install -vD hyx $out/bin/hyx
'';
meta = {
description = "Minimalistic but powerful Linux console hex editor";
mainProgram = "hyx";
homepage = "https://yx7.cc/code/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fpletz ];
platforms = with lib.platforms; linux ++ darwin;
};
})