diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix index dc52993ec7..52c2616fab 100644 --- a/nix/pkgs/default.nix +++ b/nix/pkgs/default.nix @@ -12,4 +12,5 @@ args: { hg-git = import ./hg-git.nix args; erbium = import ./erbium args; python-emv = import ./python-emv.nix args; + sheepshaver = import ./sheepshaver.nix args; } // (import ./heptapod-runner.nix args) diff --git a/nix/pkgs/sheepshaver.nix b/nix/pkgs/sheepshaver.nix new file mode 100644 index 0000000000..23d88dbac0 --- /dev/null +++ b/nix/pkgs/sheepshaver.nix @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: 2020 Luke Granger-Brown +# +# SPDX-License-Identifier: Apache-2.0 + +{ pkgs, ... }: +pkgs.stdenv.mkDerivation rec { + pname = "sheepshaver"; + version = "29bb3d5a5a99db494049f64c678f38301ef63432"; + + src = pkgs.fetchFromGitHub { + owner = "cebix"; + repo = "macemu"; + rev = version; + sha256 = "sha256:1rqyyyhm7w73wg29l5l1xwqljzkhd6s7smdhq3zncrkkx2rxc7fc"; + }; + unpackPhase = '' + cp -R $src/ writable/ + chmod -R u+w writable/ + make -C writable/SheepShaver links + ''; + sourceRoot = "writable/SheepShaver/src/Unix"; + + nativeBuildInputs = with pkgs; [ + autoconf automake file perl pkgconfig + ]; + + buildInputs = with pkgs; [ + gtk2 SDL xorg.libX11 xorg.libSM libslirp + ]; + + configureFlags = [ + "--enable-sdl-audio" + ]; + + preConfigure = '' + NO_CONFIGURE=1 ./autogen.sh + ''; +}