nixpkgs/pkgs/tools/text/hyx/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
848 B
Nix
Raw Normal View History

2021-08-24 11:29:02 +03:00
{ lib, stdenv, fetchurl, memstreamHook }:
2018-01-27 03:42:18 +03:00
stdenv.mkDerivation rec {
2020-07-22 11:39:55 +03:00
pname = "hyx";
2024-03-01 01:58:13 +03:00
version = "2024.02.29";
2018-01-27 03:42:18 +03:00
src = fetchurl {
2020-07-22 11:39:55 +03:00
url = "https://yx7.cc/code/hyx/hyx-${lib.replaceStrings [ "-" ] [ "." ] version}.tar.xz";
2024-03-01 01:58:13 +03:00
sha256 = "sha256-dufx3zsabeet7Rp0d60MIuNqisIQd6UgE7WDZYNHl3E=";
2018-01-27 03:42:18 +03:00
};
2021-08-24 11:29:02 +03:00
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace Makefile \
--replace "-Wl,-z,relro,-z,now -fpic -pie" ""
2020-07-22 12:35:54 +03:00
'';
2021-08-24 11:29:02 +03:00
buildInputs = lib.optional (stdenv.system == "x86_64-darwin") memstreamHook;
2020-07-22 12:35:54 +03:00
2018-01-27 03:42:18 +03:00
installPhase = ''
install -vD hyx $out/bin/hyx
'';
meta = with lib; {
description = "minimalistic but powerful Linux console hex editor";
homepage = "https://yx7.cc/code/";
2018-01-27 03:42:18 +03:00
license = licenses.mit;
maintainers = with maintainers; [ fpletz ];
2020-07-22 12:35:54 +03:00
platforms = with platforms; linux ++ darwin;
2018-01-27 03:42:18 +03:00
};
}