nixos/man-db: use nativeBuildInputs

This commit is contained in:
Sandro Jäckel 2022-12-18 14:19:36 +01:00
parent 76672661b9
commit a6fa6abb15
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -52,13 +52,11 @@ in
environment.systemPackages = [ cfg.package ];
environment.etc."man_db.conf".text =
let
mandbForBuild = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then
cfg.package
else
pkgs.buildPackages.man-db;
manualCache = pkgs.runCommand "man-cache" { } ''
manualCache = pkgs.runCommand "man-cache" {
nativeBuildInputs = [ cfg.package ];
} ''
echo "MANDB_MAP ${cfg.manualPages}/share/man $out" > man.conf
${mandbForBuild}/bin/mandb -C man.conf -psc >/dev/null 2>&1
mandb -C man.conf -psc >/dev/null 2>&1
'';
in
''