koreader-from-src: get glib input working

This commit is contained in:
2023-07-21 09:15:03 +00:00
parent 439eeeeb45
commit e29361f05e
2 changed files with 27 additions and 5 deletions

View File

@@ -17,6 +17,7 @@
# , lua51Packages # , lua51Packages
, perl , perl
, pkg-config , pkg-config
, python3
, ragel , ragel
, sdcv , sdcv
, SDL2 , SDL2
@@ -109,6 +110,7 @@ stdenv.mkDerivation rec {
makeWrapper makeWrapper
perl # TODO: openssl might try to take a runtime dep on this; see nixpkg perl # TODO: openssl might try to take a runtime dep on this; see nixpkg
pkg-config pkg-config
python3
ragel ragel
which which
# luajit_lua52.pkgs.luarocks # luajit_lua52.pkgs.luarocks
@@ -125,8 +127,30 @@ stdenv.mkDerivation rec {
SDL2 SDL2
]; ];
postPatch = '' postPatch =
substituteInPlace ../openssl/config --replace '/usr/bin/env' '${buildPackages.coreutils}/bin/env' let
env = "${buildPackages.coreutils}/bin/env";
in ''
substituteInPlace ../openssl/config --replace '/usr/bin/env' '${env}'
chmod +x ../glib/gio/gio-querymodules-wrapper.py
chmod +x ../glib/gio/tests/gengiotypefuncs.py
chmod +x ../glib/gobject/tests/taptestrunner.py
# need directory write perm in order to patchShebangs
chmod u+w ../glib/{gio,gio/tests,glib,gobject/tests,tests}
patchShebangs ../glib/gio/data-to-c.py
patchShebangs ../glib/gio/gio-querymodules-wrapper.py
patchShebangs ../glib/gio/tests/gengiotypefuncs.py
patchShebangs ../glib/glib/update-gtranslit.py
patchShebangs ../glib/gobject/tests/taptestrunner.py
patchShebangs ../glib/tests/gen-casefold-txt.py
patchShebangs ../glib/tests/gen-casemap-txt.py
substituteInPlace ../glib/gio/gdbus-2.0/codegen/gdbus-codegen.in --replace '/usr/bin/env @PYTHON@' '@PYTHON@'
substituteInPlace ../glib/glib/gtester-report.in --replace '/usr/bin/env @PYTHON@' '@PYTHON@'
substituteInPlace ../glib/gobject/glib-genmarshal.in --replace '/usr/bin/env @PYTHON@' '@PYTHON@'
substituteInPlace ../glib/gobject/glib-mkenums.in --replace '/usr/bin/env @PYTHON@' '@PYTHON@'
''; '';
dontConfigure = true; dontConfigure = true;

View File

@@ -41,9 +41,7 @@
source.hash = "sha256-znbY4tliXHXVLBd8sTKrbglOdCUb7xhcCQsDDWcQfhw="; source.hash = "sha256-znbY4tliXHXVLBd8sTKrbglOdCUb7xhcCQsDDWcQfhw=";
}; };
glib = { glib = {
# TODO: fails # Completed
# GEN xdp-dbus.c
# sh: line 1: python2.7: command not found
source.url = "https://github.com/GNOME/glib.git"; source.url = "https://github.com/GNOME/glib.git";
source.rev = "2.58.3"; source.rev = "2.58.3";
source.hash = "sha256-KmJXCJ6h2QhPyK1axk+Y9+yJzO0wnCczcogopxGShJc="; source.hash = "sha256-KmJXCJ6h2QhPyK1axk+Y9+yJzO0wnCczcogopxGShJc=";