Unverified Commit 9d2e9d8d authored by K900's avatar K900 Committed by GitHub
Browse files

Merge pull request #258434 from SuperSandro2000/locate-dbfile

nixos/locate: #258575 followup
parents 638d19ac b53f8170
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ let
  cfg = config.services.locate;
  isMLocate = hasPrefix "mlocate" cfg.locate.name;
  isPLocate = hasPrefix "plocate" cfg.locate.name;
  isMorPLocate = (isMLocate || isPLocate);
  isMorPLocate = isMLocate || isPLocate;
  isFindutils = hasPrefix "findutils" cfg.locate.name;
in
{
@@ -216,18 +216,18 @@ in
          setgid = true;
          setuid = false;
        };
        mlocate = (mkIf isMLocate {
        mlocate = mkIf isMLocate {
          group = "mlocate";
          source = "${cfg.locate}/bin/locate";
        });
        plocate = (mkIf isPLocate {
        };
        plocate = mkIf isPLocate {
          group = "plocate";
          source = "${cfg.locate}/bin/plocate";
        });
        };
      in
      mkIf isMorPLocate {
        locate = mkMerge [ common mlocate plocate ];
        plocate = (mkIf isPLocate (mkMerge [ common plocate ]));
        plocate = mkIf isPLocate (mkMerge [ common plocate ]);
      };

    environment.systemPackages = [ cfg.locate ];
+5 −1
Original line number Diff line number Diff line
@@ -5,10 +5,14 @@ stdenv.mkDerivation rec {
  version = "0.26";

  src = fetchurl {
    url = "https://releases.pagure.org/mlocate/${pname}-${version}.tar.xz";
    url = "https://releases.pagure.org/mlocate/mlocate-${version}.tar.xz";
    sha256 = "0gi6y52gkakhhlnzy0p6izc36nqhyfx5830qirhvk3qrzrwxyqrh";
  };

  makeFlags = [
    "dbfile=/var/cache/locatedb"
  ];

  meta = with lib; {
    description = "Merging locate is an utility to index and quickly search for files";
    homepage = "https://pagure.io/mlocate";
+2 −0
Original line number Diff line number Diff line
@@ -29,6 +29,8 @@ stdenv.mkDerivation rec {

  mesonFlags = [
    "-Dsystemunitdir=${placeholder "out"}/etc/systemd/system"
    "-Dsharedstatedir=/var/cache"
    "-Ddbpath=locatedb"
  ];

  meta = with lib; {