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

31 lines
849 B
Nix
Raw Normal View History

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