nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 bison,
6 flex,
7 perl,
8 curl,
9 libpng,
10 giflib,
11 alsa-lib,
12 readline,
13 libGLU,
14 libGL,
15 pkg-config,
16 gtk3,
17 glew,
18 SDL,
19 SDL_image,
20 dos2unix,
21 runtimeShell,
22 xa,
23 file,
24 wrapGAppsHook3,
25 xdg-utils,
26 libevdev,
27 pulseaudio,
28}:
29
30stdenv.mkDerivation rec {
31 pname = "vice";
32 version = "3.9";
33
34 src = fetchurl {
35 url = "mirror://sourceforge/vice-emu/vice-${version}.tar.gz";
36 sha256 = "sha256-QCArY0VeJrh+zGPrWlIyLG+j9XyrEqzwwifPn02uw3A=";
37 };
38
39 nativeBuildInputs = [
40 bison
41 dos2unix
42 file
43 flex
44 pkg-config
45 wrapGAppsHook3
46 ];
47
48 buildInputs = [
49 alsa-lib
50 curl
51 giflib
52 gtk3
53 glew
54 libGL
55 libGLU
56 libpng
57 perl
58 readline
59 SDL
60 SDL_image
61 xa
62 xdg-utils
63 libevdev
64 pulseaudio
65 ];
66 dontDisableStatic = true;
67 configureFlags = [
68 "--enable-sdl2ui"
69 "--enable-gtk3ui"
70 "--enable-desktop-files"
71 "--disable-pdf-docs"
72 "--with-gif"
73 ];
74
75 LIBS = "-lGL";
76
77 preBuild = ''
78 sed -i -e 's|#!/usr/bin/env bash|${runtimeShell}/bin/bash|' src/arch/gtk3/novte/box_drawing_generate.sh
79 '';
80
81 postInstall = ''
82 mkdir -p $out/share/applications
83 cp src/arch/gtk3/data/unix/vice-org-*.desktop $out/share/applications
84 '';
85
86 meta = {
87 description = "Emulators for a variety of 8-bit Commodore computers";
88 homepage = "https://vice-emu.sourceforge.io/";
89 license = lib.licenses.gpl2Plus;
90 maintainers = [ lib.maintainers.sander ];
91 platforms = lib.platforms.linux;
92 };
93}