18 setupHookDarwin = makeSetupHook {
19 name = "darwin-avr-gcc-hook";
21 darwinSuffixSalt = stdenv.cc.suffixSalt;
22 avrSuffixSalt = avrgcc.suffixSalt;
24 } ./setup-hook-darwin.sh;
26 stdenv.mkDerivation rec {
30 src = fetchFromGitHub {
34 sha256 = "0njz03lkw5374x1lxrq08irz4b86lzj2hibx46ssp7zv712pq55q";
40 "AVR_ROOT=${avrlibc}/avr"
41 "SIMAVR_VERSION=${version}"
49 ] ++ lib.optional stdenv.hostPlatform.isDarwin setupHookDarwin;
55 ] ++ lib.optional stdenv.hostPlatform.isDarwin GLUT;
57 # remove forbidden references to $TMPDIR
58 preFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
59 patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$out"/bin/*
63 checkTarget = "-C tests run_tests";
66 description = "Lean and mean Atmel AVR simulator";
67 mainProgram = "simavr";
68 homepage = "https://github.com/buserror/simavr";
69 license = licenses.gpl3;
70 platforms = platforms.unix;
71 maintainers = with maintainers; [ goodrone ];