2022-09-12 02:05:50 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, alsa-lib
|
|
|
|
, autoPatchelfHook
|
|
|
|
, fetchFromGitHub
|
|
|
|
, godot3-headless
|
|
|
|
, godot3-export-templates
|
|
|
|
, libGLU
|
|
|
|
, libpulseaudio
|
|
|
|
, libX11
|
|
|
|
, libXcursor
|
|
|
|
, libXi
|
|
|
|
, libXinerama
|
|
|
|
, libXrandr
|
|
|
|
, libXrender
|
|
|
|
, nix-update-script
|
|
|
|
, udev
|
|
|
|
}:
|
2022-06-24 23:53:39 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
preset =
|
|
|
|
if stdenv.isLinux then
|
|
|
|
if stdenv.is64bit then "Linux/X11 64-bit"
|
|
|
|
else "Linux/X11 32-bit"
|
|
|
|
else if stdenv.isDarwin then "Mac OSX"
|
|
|
|
else throw "unsupported platform";
|
2023-06-13 19:26:12 +02:00
|
|
|
in stdenv.mkDerivation (finalAttrs: {
|
2022-06-24 23:53:39 +02:00
|
|
|
pname = "pixelorama";
|
2023-11-03 07:41:54 +01:00
|
|
|
version = "0.11.3";
|
2022-06-24 23:53:39 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Orama-Interactive";
|
|
|
|
repo = "Pixelorama";
|
2023-06-13 19:26:12 +02:00
|
|
|
rev = "v${finalAttrs.version}";
|
2023-11-03 07:41:54 +01:00
|
|
|
sha256 = "sha256-+bQRUTEJluhcs5P87It9/oJOzrCcNFzDJVpixoQKXQc=";
|
2022-06-24 23:53:39 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2022-09-12 02:05:50 +02:00
|
|
|
autoPatchelfHook
|
|
|
|
godot3-headless
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libGLU
|
|
|
|
libX11
|
|
|
|
libXcursor
|
|
|
|
libXi
|
|
|
|
libXinerama
|
|
|
|
libXrandr
|
|
|
|
libXrender
|
2022-06-24 23:53:39 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
mkdir -p $HOME/.local/share/godot/
|
2022-09-12 02:05:50 +02:00
|
|
|
ln -s "${godot3-export-templates}/share/godot/templates" "$HOME/.local/share/godot/templates"
|
2022-06-24 23:53:39 +02:00
|
|
|
mkdir -p build
|
2022-09-12 02:05:50 +02:00
|
|
|
godot3-headless -v --export "${preset}" ./build/pixelorama
|
|
|
|
godot3-headless -v --export-pack "${preset}" ./build/pixelorama.pck
|
2022-06-24 23:53:39 +02:00
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -D -m 755 -t $out/libexec ./build/pixelorama
|
|
|
|
install -D -m 644 -t $out/libexec ./build/pixelorama.pck
|
|
|
|
install -D -m 644 -t $out/share/applications ./Misc/Linux/com.orama_interactive.Pixelorama.desktop
|
|
|
|
install -d -m 755 $out/bin
|
|
|
|
ln -s $out/libexec/pixelorama $out/bin/pixelorama
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2022-09-12 02:05:50 +02:00
|
|
|
runtimeDependencies = map lib.getLib [
|
|
|
|
alsa-lib
|
|
|
|
libpulseaudio
|
|
|
|
udev
|
|
|
|
];
|
|
|
|
|
2023-05-13 23:55:50 +02:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2022-06-24 23:53:39 +02:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://orama-interactive.itch.io/pixelorama";
|
|
|
|
description = "A free & open-source 2D sprite editor, made with the Godot Engine!";
|
2023-08-12 13:43:21 +02:00
|
|
|
changelog = "https://github.com/Orama-Interactive/Pixelorama/blob/${finalAttrs.src.rev}/CHANGELOG.md";
|
2022-06-24 23:53:39 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ felschr ];
|
|
|
|
};
|
2023-06-13 19:26:12 +02:00
|
|
|
})
|