nixpkgs/pkgs/applications/graphics/goxel/default.nix
Jan Tojnar eb04659fc2 treewide: wrapGAppsHook → wrapGAppsHook3
This was achieved using the following command:

    sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b')

And then manually reverted the following changes:

- alias in top-level.nix
- function name in wrap-gapps-hook.sh
- comment in postFixup of at-spi2-core
- comment in gtk4
- comment in preFixup of 1password-gui/linux.nix
- comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix
- comment in postFixup of telegram-desktop
- comment in postFixup of fwupd
- buildCommand of mongodb-compass
- postFixup of xflux-gui
- comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config
- description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
2024-04-27 02:23:22 +02:00

43 lines
1.2 KiB
Nix

{ lib, stdenv, fetchFromGitHub, scons, pkg-config, wrapGAppsHook3
, glfw3, gtk3, libpng }:
stdenv.mkDerivation (finalAttrs: {
pname = "goxel";
version = "0.14.0";
src = fetchFromGitHub {
owner = "guillaumechereau";
repo = "goxel";
rev = "v${finalAttrs.version}";
hash = "sha256-ueA0YW2n/DXd9AytDzfPtvtXbvuUm4VDwcdvHWObKxc=";
};
nativeBuildInputs = [ scons pkg-config wrapGAppsHook3 ];
buildInputs = [ glfw3 gtk3 libpng ];
buildPhase = ''
make release
'';
installPhase = ''
install -D ./goxel $out/bin/goxel
for res in $(ls data/icons | sed -e 's/icon//g' -e 's/.png//g'); do
install -Dm444 data/icons/icon$res.png $out/share/icons/hicolor/''${res}x''${res}/apps/goxel.png
done
install -Dm444 snap/gui/goxel.desktop -t $out/share/applications
substituteInPlace $out/share/applications/goxel.desktop \
--replace 'Icon=''${SNAP}/icon.png' 'Icon=goxel'
'';
meta = with lib; {
description = "Open Source 3D voxel editor";
mainProgram = "goxel";
homepage = "https://guillaumechereau.github.io/goxel/";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ tilpner fgaz ];
};
})