nixpkgs/pkgs/development/tools/simavr/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, stdenv, makeSetupHook, fetchFromGitHub, libelf, which, pkg-config, freeglut
, avrgcc, avrlibc
2019-11-10 16:44:34 +00:00
, libGLU, libGL
2018-12-10 23:25:35 +00:00
, GLUT }:
let
setupHookDarwin = makeSetupHook {
name = "darwin-avr-gcc-hook";
substitutions = {
darwinSuffixSalt = stdenv.cc.suffixSalt;
avrSuffixSalt = avrgcc.suffixSalt;
};
} ./setup-hook-darwin.sh;
in stdenv.mkDerivation rec {
pname = "simavr";
2021-09-27 13:12:28 +00:00
version = "1.7";
src = fetchFromGitHub {
owner = "buserror";
repo = "simavr";
2021-09-27 13:12:28 +00:00
rev = "v${version}";
sha256 = "0njz03lkw5374x1lxrq08irz4b86lzj2hibx46ssp7zv712pq55q";
};
2018-12-10 23:25:35 +00:00
makeFlags = [
"DESTDIR=$(out)"
"PREFIX="
"AVR_ROOT=${avrlibc}/avr"
"SIMAVR_VERSION=${version}"
"AVR=avr-"
];
nativeBuildInputs = [ which pkg-config avrgcc ]
++ lib.optional stdenv.isDarwin setupHookDarwin;
2019-11-10 16:44:34 +00:00
buildInputs = [ libelf freeglut libGLU libGL ]
++ lib.optional stdenv.isDarwin GLUT;
# Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" '';
2018-12-10 23:25:35 +00:00
doCheck = true;
checkTarget = "-C tests run_tests";
meta = with lib; {
description = "A lean and mean Atmel AVR simulator";
homepage = "https://github.com/buserror/simavr";
license = licenses.gpl3;
2018-12-10 23:25:35 +00:00
platforms = platforms.unix;
maintainers = with maintainers; [ goodrone ];
};
}