1
0
forked from colin/nix-files

koreader-from-src: tidy

This commit is contained in:
Colin 2024-02-03 16:27:35 +00:00
parent 111946eb1d
commit 79736a4a0a

View File

@ -163,7 +163,7 @@ stdenv.mkDerivation rec {
dontConfigure = true;
buildPhase = ''
install_lib() {
link_lib_src() {
lib="$1"
rev="$2"
platform="$3"
@ -208,16 +208,16 @@ stdenv.mkDerivation rec {
chmod u+w -R "$prefix/src/$lib"
}
'' + builtins.concatStringsSep "\n" (lib.mapAttrsToList
(name: src:
let
# for machine-agnostic libraries (e.g. pure lua), koreader doesn't build them in a flavored directory
machine = if src.machineAgnostic or false then "" else stdenv.hostPlatform.config;
in
''install_lib "${name}" "${src.source.rev}" "${machine}"''
)
sources.thirdparty
) + ''
${builtins.concatStringsSep "\n" (lib.mapAttrsToList
(name: src:
let
# for machine-agnostic libraries (e.g. pure lua), koreader doesn't build them in a flavored directory
machine = if src.machineAgnostic or false then "" else stdenv.hostPlatform.config;
in
''link_lib_src "${name}" "${src.source.rev}" "${machine}"''
)
sources.thirdparty
)}
make TARGET=${target} DEBIAN=1 SHELL=sh VERBOSE=1
'';