environment.systemPackages and /run/current-system/sw/share/

I wrote a derivation like this

minetest-mods = pkgs.stdenv.mkDerivation {
    name = "minetest-mods";

    src = pkgs.fetchgit {
      url = "https://code.elinvention.ovh/Elinvention/elinvention-mods.git";
      fetchSubmodules = true;
      sha256 = "1zpga1cx49cxd0z6nb6q5rq7317f9kcyah4afs046rxgz9yfmyrq";
    };

    phases = [ "installPhase" ];

    installPhase = ''
      mkdir -p $out/share/minetest-mods
      cp -ra $src/. $out/share/minetest-mods
    '';
}

Then I put minetest-mods in environment.systemPackages like this: environment.systemPackages = [ minetest-mods ];. From what I understood from the docs, I should find the directory structure of that git repo under /run/current-system/sw/share/minetest-mods/, but instead there is no such directory.

What am I missing?

Try adding /share/minetest-mods to environment.pathsToLink

1 Like