Felix Schröter 2024-07-29 19:42:43 +02:00
parent 9ed7aa0f4e
commit 9a8324dc23
No known key found for this signature in database
GPG Key ID: 671E39E6744C807D

View File

@ -4,18 +4,18 @@
alsa-lib,
autoPatchelfHook,
fetchFromGitHub,
godot3-headless,
godot3-export-templates,
libGLU,
godot_4,
godot_4-export-templates,
libGL,
libpulseaudio,
libX11,
libXcursor,
libXext,
libXi,
libXinerama,
libXrandr,
libXrender,
nix-update-script,
udev,
vulkan-loader,
}:
let
@ -26,42 +26,48 @@ let
"Mac OSX"
else
throw "unsupported platform";
godot_version_folder = lib.replaceStrings [ "-" ] [ "." ] godot_4.version;
in
stdenv.mkDerivation (finalAttrs: {
pname = "pixelorama";
version = "0.11.4";
version = "1.0.1";
src = fetchFromGitHub {
owner = "Orama-Interactive";
repo = "Pixelorama";
rev = "v${finalAttrs.version}";
sha256 = "sha256-VEQjZ9kDqXz1hoT4PrsBtzoi1TYWyN+YcPMyf9qJMRE=";
hash = "sha256-lfim5ZiykOhI1kgsu0ni2frUVHPRIPJdrGx6TuUQcSY=";
};
strictDeps = true;
nativeBuildInputs = [
autoPatchelfHook
godot3-headless
godot_4
];
buildInputs = [
libGLU
runtimeDependencies = map lib.getLib [
alsa-lib
libGL
libpulseaudio
libX11
libXcursor
libXext
libXi
libXinerama
libXrandr
libXrender
udev
vulkan-loader
];
buildPhase = ''
runHook preBuild
export HOME=$(mktemp -d)
mkdir -p $HOME/.local/share/godot/
ln -s "${godot3-export-templates}/share/godot/templates" "$HOME/.local/share/godot/templates"
mkdir -p $HOME/.local/share/godot/export_templates
ln -s "${godot_4-export-templates}" "$HOME/.local/share/godot/export_templates/${godot_version_folder}"
mkdir -p build
godot3-headless -v --export "${preset}" ./build/pixelorama
godot3-headless -v --export-pack "${preset}" ./build/pixelorama.pck
godot4 --headless --export-release "${preset}" ./build/pixelorama
runHook postBuild
'';
@ -79,12 +85,6 @@ stdenv.mkDerivation (finalAttrs: {
runHook postInstall
'';
runtimeDependencies = map lib.getLib [
alsa-lib
libpulseaudio
udev
];
passthru.updateScript = nix-update-script { };
meta = with lib; {