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

31 lines
848 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";
2021-12-10 18:42:11 +01:00
version = "2021.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";
2021-12-10 18:42:11 +01:00
sha256 = "sha256-jU8U5YWE1syPBOQ8o4BC7tIYiCo4kknCCwhnMCVtpes=";
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
};
}