Fix inefficient copy warning by using self instead of ./. in nix derivation

As suggested by the Determinate Nix changelog, replace the relative path
reference with the flake's self input to avoid unnecessary copying to
the store. This improves evaluation performance and reduces file copies.

References: https://determinate.systems/posts/changelog-determinate-nix-362/#track-down-and-fix-inefficient-double-copy-causes
This commit is contained in:
connerohnesorge 2025-06-10 12:40:53 -05:00
parent 613878cb6f
commit d9480c60b7
2 changed files with 3 additions and 1 deletions

View file

@ -32,6 +32,7 @@
hyprland-protocols = final: prev: {
hyprland-protocols = final.callPackage ./nix/default.nix {
version = version + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
inherit self;
};
};
};

View file

@ -4,12 +4,13 @@
meson,
ninja,
version,
self,
}:
stdenv.mkDerivation {
pname = "hyprland-protocols";
inherit version;
src = ../.;
src = self;
nativeBuildInputs = [meson ninja];