nixos/man-db: fix cross‐compilation
I don’t love this, but it seems to be the best we can do.
This commit is contained in:
parent
c2a03962b8
commit
cfcdbad637
@ -69,10 +69,19 @@ in
|
|||||||
environment.systemPackages = [ cfg.package ];
|
environment.systemPackages = [ cfg.package ];
|
||||||
environment.etc."man_db.conf".text =
|
environment.etc."man_db.conf".text =
|
||||||
let
|
let
|
||||||
|
# We unfortunately can’t use the customized `cfg.package` when
|
||||||
|
# cross‐compiling. Instead we detect that situation and work
|
||||||
|
# around it by using the vanilla one, like the OpenSSH module.
|
||||||
|
buildPackage =
|
||||||
|
if pkgs.stdenv.buildPlatform.canExecute pkgs.stdenv.hostPlatform then
|
||||||
|
cfg.package
|
||||||
|
else
|
||||||
|
pkgs.buildPackages.man-db;
|
||||||
|
|
||||||
manualCache =
|
manualCache =
|
||||||
pkgs.runCommand "man-cache"
|
pkgs.runCommand "man-cache"
|
||||||
{
|
{
|
||||||
nativeBuildInputs = [ cfg.package ];
|
nativeBuildInputs = [ buildPackage ];
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
echo "MANDB_MAP ${cfg.manualPages}/share/man $out" > man.conf
|
echo "MANDB_MAP ${cfg.manualPages}/share/man $out" > man.conf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user