From 97baa55d70cc0c03722f3e3470d908b8ce1eb048 Mon Sep 17 00:00:00 2001 From: winston Date: Sat, 28 Feb 2026 16:22:25 +0100 Subject: [PATCH] vice: 3.9 -> 3.10, adopt --- pkgs/by-name/vi/vice/package.nix | 44 ++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/vi/vice/package.nix b/pkgs/by-name/vi/vice/package.nix index ac958fb50f26..0c33d3c89667 100644 --- a/pkgs/by-name/vi/vice/package.nix +++ b/pkgs/by-name/vi/vice/package.nix @@ -18,52 +18,55 @@ SDL, SDL_image, dos2unix, - runtimeShell, xa, file, wrapGAppsHook3, xdg-utils, libevdev, pulseaudio, + desktop-file-utils, }: stdenv.mkDerivation (finalAttrs: { pname = "vice"; - version = "3.9"; + version = "3.10"; src = fetchurl { url = "mirror://sourceforge/vice-emu/vice-${finalAttrs.version}.tar.gz"; - sha256 = "sha256-QCArY0VeJrh+zGPrWlIyLG+j9XyrEqzwwifPn02uw3A="; + sha256 = "sha256-jlusGMvLnxkjgK0++IH4eQ9bdcQdez2mXYMZhdhk1tE="; }; + strictDeps = true; + nativeBuildInputs = [ bison + desktop-file-utils dos2unix file flex + perl pkg-config wrapGAppsHook3 + xa + xdg-utils ]; buildInputs = [ alsa-lib curl giflib - gtk3 glew + gtk3 + libevdev libGL libGLU libpng - perl + pulseaudio readline SDL SDL_image - xa - xdg-utils - libevdev - pulseaudio ]; - dontDisableStatic = true; + configureFlags = [ "--enable-sdl2ui" "--enable-gtk3ui" @@ -74,19 +77,32 @@ stdenv.mkDerivation (finalAttrs: { env.LIBS = "-lGL"; - preBuild = '' - sed -i -e 's|#!/usr/bin/env bash|${runtimeShell}/bin/bash|' src/arch/gtk3/novte/box_drawing_generate.sh + preConfigure = '' + patchShebangs . + ''; + + enableParallelBuilding = true; + + preInstall = '' + # env var for `desktop-file-install` + export DESKTOP_FILE_INSTALL_DIR=$out/share/applications + mkdir -p $DESKTOP_FILE_INSTALL_DIR ''; postInstall = '' - mkdir -p $out/share/applications - cp src/arch/gtk3/data/unix/vice-org-*.desktop $out/share/applications + for binary in vsid x128 x64 x64dtv xcbm2 xpet xplus4 xscpu64 xvic; do + for size in 16 24 32 48 64 256; do + install -D data/common/vice-''${binary}_''${size}.png $out/share/icons/hicolor/''${size}x''${size}/apps/vice-''${binary}.png + done + install -D data/common/vice-''${binary}_1024.svg $out/share/icons/hicolor/scalable/apps/vice-''${binary}.svg + done ''; meta = { description = "Emulators for a variety of 8-bit Commodore computers"; homepage = "https://vice-emu.sourceforge.io/"; license = lib.licenses.gpl2Plus; + maintainers = [ lib.maintainers.nekowinston ]; platforms = lib.platforms.linux; }; })