xcpc: 20070122 -> 0.52.1

Changelog: https://github.com/ponceto/xcpc-emulator/blob/xcpc-0.52.1/ChangeLog

The versioning scheme changed too: this version was released 2024-09-08.

Per https://www.xcpc-emulator.net/download.html, it seems sourceforge is no
longer used. So I chose the github mirror (arbitrarily).

+28 -24
+28 -24
pkgs/by-name/xc/xcpc/package.nix
··· 1 1 { 2 2 lib, 3 3 stdenv, 4 - fetchurl, 4 + fetchFromGitHub, 5 + nix-update-script, 6 + autoreconfHook, 7 + autoconf-archive, 5 8 pkg-config, 6 - glib, 7 - libXaw, 8 - libX11, 9 - libXext, 10 - libDSKSupport ? true, 11 - libdsk, 12 - motifSupport ? false, 13 - lesstif, 9 + wrapGAppsHook3, 10 + libepoxy, 14 11 }: 15 12 16 13 stdenv.mkDerivation rec { 17 - version = "20070122"; 14 + version = "0.52.1"; 18 15 pname = "xcpc"; 19 16 20 - src = fetchurl { 21 - url = "mirror://sourceforge/xcpc/${pname}-${version}.tar.gz"; 22 - sha256 = "0hxsbhmyzyyrlidgg0q8izw55q0z40xrynw5a1c3frdnihj9jf7n"; 17 + src = fetchFromGitHub { 18 + owner = "ponceto"; 19 + repo = "xcpc-emulator"; 20 + rev = "xcpc-${version}"; 21 + hash = "sha256-N4UfnCbebaAhx0490niMov/JqlrXt5goblWbW0ajkcc="; 23 22 }; 24 23 25 - nativeBuildInputs = [ pkg-config ]; 24 + nativeBuildInputs = [ 25 + autoreconfHook 26 + autoconf-archive 27 + wrapGAppsHook3 28 + pkg-config 29 + ]; 26 30 27 - buildInputs = 28 - [ 29 - glib 30 - libdsk 31 - libXaw 32 - libX11 33 - libXext 34 - ] 35 - ++ lib.optional libDSKSupport libdsk 36 - ++ lib.optional motifSupport lesstif; 31 + buildInputs = [ libepoxy ]; 32 + 33 + passthru.updateScript = nix-update-script { }; 34 + 35 + postInstall = '' 36 + substituteInPlace $out/share/applications/xcpc.desktop --replace-fail \ 37 + "$out/bin/" "" 38 + substituteInPlace $out/share/applications/xcpc.desktop --replace-fail \ 39 + "$out/share/pixmaps/" "" 40 + ''; 37 41 38 42 meta = with lib; { 39 43 description = "Portable Amstrad CPC 464/664/6128 emulator written in C";