lol

pixelorama: Pin Godot version (#410887)

authored by

Felix Schröter and committed by
GitHub
9f4d81ef 8c00e8f7

+13 -2
+13 -2
pkgs/by-name/pi/pixelorama/package.nix
··· 2 2 lib, 3 3 stdenv, 4 4 fetchFromGitHub, 5 - godot_4, 5 + godot_4_4, 6 6 nix-update-script, 7 7 }: 8 8 ··· 16 16 presets.${stdenv.hostPlatform.system} 17 17 or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); 18 18 19 - godot = godot_4; 19 + godot = godot_4_4; 20 20 in 21 21 stdenv.mkDerivation (finalAttrs: { 22 22 pname = "pixelorama"; ··· 34 34 nativeBuildInputs = [ 35 35 godot 36 36 ]; 37 + 38 + # Pixelorama is tightly coupled to the version of Godot that it is meant to be built with, 39 + # and Godot does not follow semver, they break things in minor releases. 40 + preConfigure = '' 41 + godot_ver="${lib.versions.majorMinor godot.version}" 42 + godot_expected=$(sed -n -E 's@config/features=PackedStringArray\("([0-9]+\.[0-9]+)"\)@\1@p' project.godot) 43 + [ "$godot_ver" == "$godot_expected" ] || { 44 + echo "Expected Godot version: $godot_expected; found: $godot_ver" >&2 45 + exit 1 46 + } 47 + ''; 37 48 38 49 buildPhase = '' 39 50 runHook preBuild