From f195fc555f19641d05b1e054238199d1089f529e Mon Sep 17 00:00:00 2001 From: milomc123 <33701036+milomc123@users.noreply.github.com> Date: Sat, 28 Mar 2026 09:59:48 +0000 Subject: [PATCH] fix(nix flake): Fix Nix build phase errors - postUnpack: use $sourceRoot instead of hardcoded "source/" so subprojects are copied into the actual unpacked directory - installPhase: call makeWrapper directly, it is a setup hook injected by nativeBuildInputs, not a bin/ binary - nativeBuildInputs: add makeWrapper and unzip --- flake.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index 24a17ed0b..fd8af4473 100644 --- a/flake.nix +++ b/flake.nix @@ -58,15 +58,15 @@ # 4jcraft - Meson expects this subprojects structure postUnpack = '' - mkdir -p source/subprojects + mkdir -p $sourceRoot/subprojects - cp -r ${inputs.shiggy} source/subprojects/shiggy - cp -r ${inputs."4jlibs"} source/subprojects/4jlibs - cp -r ${inputs.stb} source/subprojects/stb - cp -r ${inputs.simdutf} source/subprojects/simdutf - cp -r ${inputs.miniaudio} source/subprojects/miniaudio + cp -r ${inputs.shiggy} $sourceRoot/subprojects/shiggy + cp -r ${inputs."4jlibs"} $sourceRoot/subprojects/4jlibs + cp -r ${inputs.stb} $sourceRoot/subprojects/stb + cp -r ${inputs.simdutf} $sourceRoot/subprojects/simdutf + cp -r ${inputs.miniaudio} $sourceRoot/subprojects/miniaudio - chmod -R u+w source/subprojects + chmod -R u+w $sourceRoot/subprojects ''; # 4jcraft - `stb` and `simdutf` patches @@ -75,7 +75,7 @@ cp subprojects/packagefiles/simdutf/meson.build subprojects/simdutf/meson.build cp subprojects/packagefiles/simdutf/meson.options subprojects/simdutf/meson.options - ${pkgs.unzip} ${inputs.miniaudio-patch} -d miniaudio-patch-tmp + unzip ${inputs.miniaudio-patch} -d miniaudio-patch-tmp cp -r miniaudio-patch-tmp/*/. subprojects/miniaudio/ cat > subprojects/miniaudio.wrap <