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

46 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, libelf, which, pkgconfig, freeglut
, avrgcc, avrlibc
2019-11-10 17:44:34 +01:00
, libGLU, libGL
2018-12-11 00:25:35 +01:00
, GLUT }:
stdenv.mkDerivation rec {
pname = "simavr";
2017-03-01 18:01:40 +01:00
version = "1.5";
src = fetchFromGitHub {
owner = "buserror";
repo = "simavr";
2017-03-01 18:01:40 +01:00
rev = "e0d4de41a72520491a4076b3ed87beb997a395c0";
sha256 = "0b2lh6l2niv80dmbm9xkamvnivkbmqw6v97sy29afalrwfxylxla";
};
2018-12-11 00:25:35 +01:00
makeFlags = [
"DESTDIR=$(out)"
"PREFIX="
"AVR_ROOT=${avrlibc}/avr"
"SIMAVR_VERSION=${version}"
"AVR=avr-"
];
2019-11-03 14:14:32 +01:00
NIX_CFLAGS_COMPILE = [ "-Wno-error=stringop-truncation" ];
2018-12-11 00:25:35 +01:00
nativeBuildInputs = [ which pkgconfig avrgcc ];
2019-11-10 17:44:34 +01:00
buildInputs = [ libelf freeglut libGLU libGL ]
2018-12-11 00:25:35 +01:00
++ stdenv.lib.optional stdenv.isDarwin GLUT;
# Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" '';
2018-12-11 00:25:35 +01:00
doCheck = true;
checkTarget = "-C tests run_tests";
meta = with stdenv.lib; {
description = "A lean and mean Atmel AVR simulator";
homepage = https://github.com/buserror/simavr;
license = licenses.gpl3;
2018-12-11 00:25:35 +01:00
platforms = platforms.unix;
maintainers = with maintainers; [ goodrone ];
};
}