Merge pull request #179500 from 0xd61/submit/gf
gf: init at unstable-2022-06-22
This commit is contained in:
commit
cdc8b2b62a
4 changed files with 85 additions and 0 deletions
|
@ -85,6 +85,12 @@
|
|||
githubId = 56617252;
|
||||
matrix = "@oxc45:matrix.org";
|
||||
};
|
||||
_0xd61 = {
|
||||
email = "dgl@degit.co";
|
||||
name = "Daniel Glinka";
|
||||
github = "0xd61";
|
||||
githubId = 8351869;
|
||||
};
|
||||
_1000101 = {
|
||||
email = "b1000101@pm.me";
|
||||
github = "1000101";
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/build.sh b/build.sh
|
||||
index e471563..32bdfab 100755
|
||||
--- a/build.sh
|
||||
+++ b/build.sh
|
||||
@@ -5,7 +5,7 @@ gdb --version > /dev/null 2>&1 || printf "\033[0;31mWarning\033[0m: GDB not dete
|
||||
echo q | gdb | grep "(gdb)" > /dev/null 2>&1 || printf "\033[0;31mWarning\033[0m: Your copy of GDB appears to be non-standard or has been heavily reconfigured with .gdbinit.\nIf you are using GDB plugins like 'GDB Dashboard' you must remove them,\nas otherwise gf will be unable to communicate with GDB.\n"
|
||||
|
||||
# Check if FreeType is available.
|
||||
-if [ -d /usr/include/freetype2 ]; then extra_flags="$extra_flags -lfreetype -D UI_FREETYPE -I /usr/include/freetype2";
|
||||
+if pkg-config --cflags freetype2 > /dev/null; then extra_flags="$extra_flags -D UI_FREETYPE $(pkg-config --cflags --libs freetype2)";
|
||||
else printf "\033[0;31mWarning\033[0m: FreeType could not be found. The fallback font will be used.\n"; fi
|
||||
|
||||
# Check if SSE2 is available.
|
64
pkgs/development/tools/misc/gf/default.nix
Normal file
64
pkgs/development/tools/misc/gf/default.nix
Normal file
|
@ -0,0 +1,64 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, makeWrapper
|
||||
, fetchFromGitHub
|
||||
, libX11
|
||||
, pkg-config
|
||||
, gdb
|
||||
, freetype
|
||||
, freetypeSupport ? true
|
||||
, extensions ? [ ]
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gf";
|
||||
version = "unstable-2022-06-22";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "gf";
|
||||
owner = "nakst";
|
||||
rev = "e0d6d2f59344f853a4a204d5313db6b6a5e5de7d";
|
||||
sha256 = "01fln4wnn1caqr4wa1nhcp0rqdx5m5nqyn2amvclp5hhi3h3qaiq";
|
||||
};
|
||||
|
||||
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; {
|
||||
description = "A GDB Frontend";
|
||||
homepage = "https://github.com/nakst/gf";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ _0xd61 ];
|
||||
};
|
||||
}
|
|
@ -16740,6 +16740,8 @@ with pkgs;
|
|||
readline = readline81;
|
||||
};
|
||||
|
||||
gf = callPackage ../development/tools/misc/gf { };
|
||||
|
||||
java-language-server = callPackage ../development/tools/java/java-language-server { };
|
||||
|
||||
jprofiler = callPackage ../development/tools/java/jprofiler {
|
||||
|
|
Loading…
Reference in a new issue