Merge pull request #206709 from SuperSandro2000/mandb-misc

nixos/man-db: use nativeBuildInputs
This commit is contained in:
Artturi 2022-12-19 17:55:46 +02:00 committed by GitHub
commit 1c387ed1a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
''