Merge pull request #179500 from 0xd61/submit/gf

gf: init at unstable-2022-06-22

authored by Anderson Torres and committed by GitHub cdc8b2b6 a8e40c02

+85
+6
maintainers/maintainer-list.nix
··· 85 85 githubId = 56617252; 86 86 matrix = "@oxc45:matrix.org"; 87 87 }; 88 + _0xd61 = { 89 + email = "dgl@degit.co"; 90 + name = "Daniel Glinka"; 91 + github = "0xd61"; 92 + githubId = 8351869; 93 + }; 88 94 _1000101 = { 89 95 email = "b1000101@pm.me"; 90 96 github = "1000101";
+13
pkgs/development/tools/misc/gf/build-use-optional-freetype-with-pkg-config.patch
··· 1 + diff --git a/build.sh b/build.sh 2 + index e471563..32bdfab 100755 3 + --- a/build.sh 4 + +++ b/build.sh 5 + @@ -5,7 +5,7 @@ gdb --version > /dev/null 2>&1 || printf "\033[0;31mWarning\033[0m: GDB not dete 6 + 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" 7 + 8 + # Check if FreeType is available. 9 + -if [ -d /usr/include/freetype2 ]; then extra_flags="$extra_flags -lfreetype -D UI_FREETYPE -I /usr/include/freetype2"; 10 + +if pkg-config --cflags freetype2 > /dev/null; then extra_flags="$extra_flags -D UI_FREETYPE $(pkg-config --cflags --libs freetype2)"; 11 + else printf "\033[0;31mWarning\033[0m: FreeType could not be found. The fallback font will be used.\n"; fi 12 + 13 + # Check if SSE2 is available.
+64
pkgs/development/tools/misc/gf/default.nix
··· 1 + { lib 2 + , stdenv 3 + , makeWrapper 4 + , fetchFromGitHub 5 + , libX11 6 + , pkg-config 7 + , gdb 8 + , freetype 9 + , freetypeSupport ? true 10 + , extensions ? [ ] 11 + }: 12 + 13 + stdenv.mkDerivation rec { 14 + pname = "gf"; 15 + version = "unstable-2022-06-22"; 16 + 17 + src = fetchFromGitHub { 18 + repo = "gf"; 19 + owner = "nakst"; 20 + rev = "e0d6d2f59344f853a4a204d5313db6b6a5e5de7d"; 21 + sha256 = "01fln4wnn1caqr4wa1nhcp0rqdx5m5nqyn2amvclp5hhi3h3qaiq"; 22 + }; 23 + 24 + nativeBuildInputs = [ makeWrapper pkg-config ]; 25 + buildInputs = [ libX11 gdb ] 26 + ++ lib.optional freetypeSupport freetype; 27 + 28 + patches = [ 29 + ./build-use-optional-freetype-with-pkg-config.patch 30 + ]; 31 + 32 + postPatch = lib.forEach extensions (ext: '' 33 + cp ${ext} ./${ext.name or (builtins.baseNameOf ext)} 34 + ''); 35 + 36 + preConfigure = '' 37 + patchShebangs build.sh 38 + ''; 39 + 40 + buildPhase = '' 41 + runHook preBuild 42 + extra_flags=-DUI_FREETYPE_SUBPIXEL ./build.sh 43 + runHook postBuild 44 + ''; 45 + 46 + installPhase = '' 47 + runHook preInstall 48 + mkdir -p "$out/bin" 49 + cp gf2 "$out/bin/" 50 + runHook postInstall 51 + ''; 52 + 53 + postFixup = '' 54 + wrapProgram $out/bin/gf2 --prefix PATH : ${lib.makeBinPath[ gdb ]} 55 + ''; 56 + 57 + meta = with lib; { 58 + description = "A GDB Frontend"; 59 + homepage = "https://github.com/nakst/gf"; 60 + license = licenses.mit; 61 + platforms = platforms.linux; 62 + maintainers = with maintainers; [ _0xd61 ]; 63 + }; 64 + }
+2
pkgs/top-level/all-packages.nix
··· 16740 16740 readline = readline81; 16741 16741 }; 16742 16742 16743 + gf = callPackage ../development/tools/misc/gf { }; 16744 + 16743 16745 java-language-server = callPackage ../development/tools/java/java-language-server { }; 16744 16746 16745 16747 jprofiler = callPackage ../development/tools/java/jprofiler {