From e6fa2145cfbf8e069964e759dca556a7b0f4f0e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Schr=C3=B6ter?= Date: Mon, 29 Jul 2024 19:45:15 +0200 Subject: [PATCH 1/3] pixelorama: migrate to pkgs/by-name --- .../default.nix => by-name/pi/pixelorama/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{applications/editors/pixelorama/default.nix => by-name/pi/pixelorama/package.nix} (100%) diff --git a/pkgs/applications/editors/pixelorama/default.nix b/pkgs/by-name/pi/pixelorama/package.nix similarity index 100% rename from pkgs/applications/editors/pixelorama/default.nix rename to pkgs/by-name/pi/pixelorama/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fcc9529689b3..4fc7bf6a4d8e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30936,8 +30936,6 @@ with pkgs; pixelnuke = callPackage ../applications/graphics/pixelnuke { }; - pixelorama = callPackage ../applications/editors/pixelorama { }; - pixeluvo = callPackage ../applications/graphics/pixeluvo { }; pixinsight = qt6Packages.callPackage ../applications/graphics/pixinsight { }; From 9ed7aa0f4e0868b803344ffb0be06e2dbde26ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Schr=C3=B6ter?= Date: Mon, 29 Jul 2024 20:05:17 +0200 Subject: [PATCH 2/3] pixelorama: reformat --- pkgs/by-name/pi/pixelorama/package.nix | 52 ++++++++++++++------------ 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/pkgs/by-name/pi/pixelorama/package.nix b/pkgs/by-name/pi/pixelorama/package.nix index 59be19eaab55..d7345b9865b5 100644 --- a/pkgs/by-name/pi/pixelorama/package.nix +++ b/pkgs/by-name/pi/pixelorama/package.nix @@ -1,30 +1,33 @@ -{ lib -, stdenv -, alsa-lib -, autoPatchelfHook -, fetchFromGitHub -, godot3-headless -, godot3-export-templates -, libGLU -, libpulseaudio -, libX11 -, libXcursor -, libXi -, libXinerama -, libXrandr -, libXrender -, nix-update-script -, udev +{ + lib, + stdenv, + alsa-lib, + autoPatchelfHook, + fetchFromGitHub, + godot3-headless, + godot3-export-templates, + libGLU, + libpulseaudio, + libX11, + libXcursor, + libXi, + libXinerama, + libXrandr, + libXrender, + nix-update-script, + udev, }: 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"; -in stdenv.mkDerivation (finalAttrs: { + if stdenv.is64bit then "Linux/X11 64-bit" else "Linux/X11 32-bit" + else if stdenv.isDarwin then + "Mac OSX" + else + throw "unsupported platform"; +in +stdenv.mkDerivation (finalAttrs: { pname = "pixelorama"; version = "0.11.4"; @@ -89,7 +92,10 @@ in stdenv.mkDerivation (finalAttrs: { description = "Free & open-source 2D sprite editor, made with the Godot Engine!"; changelog = "https://github.com/Orama-Interactive/Pixelorama/blob/${finalAttrs.src.rev}/CHANGELOG.md"; license = licenses.mit; - platforms = [ "i686-linux" "x86_64-linux" ]; + platforms = [ + "i686-linux" + "x86_64-linux" + ]; maintainers = with maintainers; [ felschr ]; mainProgram = "pixelorama"; }; From 9a8324dc235a9317906be381d44216516f2ff917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Schr=C3=B6ter?= Date: Mon, 29 Jul 2024 19:42:43 +0200 Subject: [PATCH 3/3] pixelorama: 0.11.4 -> 1.0.1 https://github.com/Orama-Interactive/Pixelorama/releases/tag/v1.0 https://github.com/Orama-Interactive/Pixelorama/releases/tag/v1.0.1 --- pkgs/by-name/pi/pixelorama/package.nix | 44 +++++++++++++------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/pkgs/by-name/pi/pixelorama/package.nix b/pkgs/by-name/pi/pixelorama/package.nix index d7345b9865b5..dfe9abf9632f 100644 --- a/pkgs/by-name/pi/pixelorama/package.nix +++ b/pkgs/by-name/pi/pixelorama/package.nix @@ -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; {