mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
pixelorama: Pin Godot version
This commit is contained in:
parent
97ff9116a3
commit
055f524a04
1 changed files with 13 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
|||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
godot_4,
|
||||
godot_4_4,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
|
@ -16,7 +16,7 @@ let
|
|||
presets.${stdenv.hostPlatform.system}
|
||||
or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
|
||||
godot = godot_4;
|
||||
godot = godot_4_4;
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "pixelorama";
|
||||
|
@ -35,6 +35,17 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
godot
|
||||
];
|
||||
|
||||
# Pixelorama is tightly coupled to the version of Godot that it is meant to be built with,
|
||||
# and Godot does not follow semver, they break things in minor releases.
|
||||
preConfigure = ''
|
||||
godot_ver="${lib.versions.majorMinor godot.version}"
|
||||
godot_expected=$(sed -n -E 's@config/features=PackedStringArray\("([0-9]+\.[0-9]+)"\)@\1@p' project.godot)
|
||||
[ "$godot_ver" == "$godot_expected" ] || {
|
||||
echo "Expected Godot version: $godot_expected; found: $godot_ver" >&2
|
||||
exit 1
|
||||
}
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue