From 7cf0c721f9b322c0cd0999546aa034abbf82e0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Mon, 29 Sep 2025 16:19:44 +0200 Subject: [PATCH] nix: Use lib.cleanSource The old hash worked for me locally but not on another machine when pulled from GH (reproduced locally too with --rebuild). The issue was that having *specific* detached git state makes composer produce different metadata in vendor/composer/installed.php (and other files). Being detached *from a branch* does not seem to have an effect, but being detached *from a commit* does. Therefore, the vendor/ metadata was highly affected by local git/jujutsu state. --- flake.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index df1d65f..6d8a559 100644 --- a/flake.nix +++ b/flake.nix @@ -66,9 +66,9 @@ composerDeps = php74.buildComposerProject2 { pname = "tenancy-docs-composer"; version = "1.0.0"; - src = ./.; + src = pkgs.lib.cleanSource ./.; - vendorHash = "sha256-X7yyQ/fV5vKul+jZlw1vMsPsMrBMVUGhMMDMJDUugsU="; + vendorHash = "sha256-Gc5eqGEURko8Wigke7EZBFnEfvK8vXkLRsU3kv/tbFo="; postInstall = '' cp -R ./vendor/* $out @@ -77,7 +77,7 @@ in pkgs.buildNpmPackage { pname = "tenancy-docs"; version = "1.0.0"; - src = ./.; + src = pkgs.lib.cleanSource ./.; nodejs = pkgs.nodejs_24; npmDepsHash = "sha256-ufeN4BXCAlZZypViznlkXWosSgZ5nsPvMJJ0FVLXxJI=";