10 stdenv.mkDerivation rec {
11 pname = "minivmac-erichelgeson";
12 version = "2024.06.08";
14 src = fetchFromGitHub {
15 owner = "erichelgeson";
18 hash = "sha256-iiEE0ioXh3keKUPfAB+YcE1iggGLpxT9N8LSVFDhttE=";
21 buildInputs = [ xorg.libX11 ];
23 makeFlags = [ "PREFIX=${placeholder "out"}" ];
26 ${lib.getExe' buildPackages.stdenv.cc "cc"} setup/tool.c -o setup_t
27 ./setup_t -t lx64 > setup.sh
29 # Patch hardcoded references in setup.sh to cross-aware counterparts
30 substituteInPlace setup.sh --replace 'gcc ' '${stdenv.cc.targetPrefix}cc '
31 substituteInPlace setup.sh --replace 'strip --strip-unneeded' '${stdenv.cc.targetPrefix}strip --strip-unneeded'
37 install -Dm755 -t $out/bin ./minivmac
40 # ensure libasound can be dlopen()'ed
42 patchelf --add-rpath "${lib.getLib alsa-lib}/lib" $out/bin/minivmac
46 description = "miniature early Macintosh emulator (fork from erichelgeson)";
47 homepage = "https://github.com/erichelgeson/minivmac";
48 license = licenses.gpl2;
49 maintainers = [ maintainers.flokli ];
50 platforms = platforms.linux;
51 sourceProvenance = [ sourceTypes.fromSource ];