3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/simavr/default.nix

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

47 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, 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 }:
stdenv.mkDerivation rec {
pname = "simavr";
2021-09-27 14:12:28 +01:00
version = "1.7";
src = fetchFromGitHub {
owner = "buserror";
repo = "simavr";
2021-09-27 14:12:28 +01: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-"
];
2019-11-03 13:14:32 +00:00
NIX_CFLAGS_COMPILE = [ "-Wno-error=stringop-truncation" ];
nativeBuildInputs = [ which pkg-config avrgcc ];
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; {
broken = stdenv.isDarwin;
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 ];
};
}