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 08:29:02 +00:00
{ lib, stdenv, fetchurl, memstreamHook }:
2018-01-27 00:42:18 +00:00
stdenv.mkDerivation rec {
2020-07-22 08:39:55 +00:00
pname = "hyx";
2021-12-10 17:42:11 +00:00
version = "2021.06.09";
2018-01-27 00:42:18 +00:00
src = fetchurl {
2020-07-22 08:39:55 +00:00
url = "https://yx7.cc/code/hyx/hyx-${lib.replaceStrings [ "-" ] [ "." ] version}.tar.xz";
2021-12-10 17:42:11 +00:00
sha256 = "sha256-jU8U5YWE1syPBOQ8o4BC7tIYiCo4kknCCwhnMCVtpes=";
2018-01-27 00:42:18 +00:00
};
2021-08-24 08:29:02 +00:00
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace Makefile \
--replace "-Wl,-z,relro,-z,now -fpic -pie" ""
2020-07-22 09:35:54 +00:00
'';
2021-08-24 08:29:02 +00:00
buildInputs = lib.optional (stdenv.system == "x86_64-darwin") memstreamHook;
2020-07-22 09:35:54 +00:00
2018-01-27 00:42:18 +00: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 00:42:18 +00:00
license = licenses.mit;
maintainers = with maintainers; [ fpletz ];
2020-07-22 09:35:54 +00:00
platforms = with platforms; linux ++ darwin;
2018-01-27 00:42:18 +00:00
};
}