2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, makeWrapper
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libX11
|
|
|
|
, pkg-config
|
|
|
|
, gdb
|
|
|
|
, freetype
|
|
|
|
, freetypeSupport ? true
|
|
|
|
, extensions ? [ ]
|
|
|
|
}:
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
stdenv.mkDerivation {
|
2022-07-14 12:49:19 +00:00
|
|
|
pname = "gf";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "unstable-2023-08-09";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "gf";
|
|
|
|
owner = "nakst";
|
2023-08-22 20:05:09 +00:00
|
|
|
rev = "4190211d63c1e5378a9e841d22fa2b96a1099e68";
|
|
|
|
hash = "sha256-28Xgw/KxwZ94r/TXsdISeUtXHSips4irB0D+tEefMYE=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper pkg-config ];
|
|
|
|
buildInputs = [ libX11 gdb ]
|
|
|
|
++ lib.optional freetypeSupport freetype;
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./build-use-optional-freetype-with-pkg-config.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = lib.forEach extensions (ext: ''
|
|
|
|
cp ${ext} ./${ext.name or (builtins.baseNameOf ext)}
|
|
|
|
'');
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs build.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
extra_flags=-DUI_FREETYPE_SUBPIXEL ./build.sh
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
cp gf2 "$out/bin/"
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/gf2 --prefix PATH : ${lib.makeBinPath[ gdb ]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "GDB Frontend";
|
2022-07-14 12:49:19 +00:00
|
|
|
homepage = "https://github.com/nakst/gf";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
2023-08-22 20:05:09 +00:00
|
|
|
mainProgram = "gf2";
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = with maintainers; [ _0xd61 ];
|
|
|
|
};
|
|
|
|
}
|