nixos/locate: remove nixpkgs.config usage

This commit is contained in:
K900
2023-09-26 17:54:22 +03:00
parent ce87196a00
commit 38461ff27a
3 changed files with 4 additions and 10 deletions

View File

@@ -230,9 +230,7 @@ in
plocate = (mkIf isPLocate (mkMerge [ common plocate ])); plocate = (mkIf isPLocate (mkMerge [ common plocate ]));
}; };
nixpkgs.config = { locate.dbfile = cfg.output; }; environment.systemPackages = [ (cfg.locate.override { dbfile = cfg.output; }) ];
environment.systemPackages = [ cfg.locate ];
environment.variables = mkIf (!isMorPLocate) { LOCATE_PATH = cfg.output; }; environment.variables = mkIf (!isMorPLocate) { LOCATE_PATH = cfg.output; };

View File

@@ -1,8 +1,6 @@
{ lib, stdenv, fetchurl, config }: { lib, stdenv, fetchurl, config, dbfile ? config.locate.dbfile or "/var/cache/locatedb" }:
let stdenv.mkDerivation rec {
dbfile = lib.attrByPath [ "locate" "dbfile" ] "/var/cache/locatedb" config;
in stdenv.mkDerivation rec {
pname = "mlocate"; pname = "mlocate";
version = "0.26"; version = "0.26";

View File

@@ -8,10 +8,8 @@
, systemd , systemd
, liburing , liburing
, zstd , zstd
, dbfile ? config.locate.dbfile or "/var/cache/locatedb"
}: }:
let
dbfile = lib.attrByPath [ "locate" "dbfile" ] "/var/cache/locatedb" config;
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "plocate"; pname = "plocate";
version = "1.1.19"; version = "1.1.19";