diff --git a/pkgs/development/tools/simavr/default.nix b/pkgs/development/tools/simavr/default.nix new file mode 100644 index 000000000000..823f93f9ac4f --- /dev/null +++ b/pkgs/development/tools/simavr/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, avrgcclibc, libelf, which, git, pkgconfig, freeglut +, mesa }: + +stdenv.mkDerivation rec { + name = "simavr-${version}"; + version = "1.3"; + enableParallelBuilding = true; + + src = fetchFromGitHub { + owner = "buserror"; + repo = "simavr"; + rev = "51d5fa69f9bc3d62941827faec02f8fbc7e187ab"; + sha256 = "0k8xwzw9i6xsmf98q43fxhphq0wvflvmzqma1n4jd1ym9wi48lfx"; + }; + + buildFlags = "AVR_ROOT=${avrgcclibc}/avr SIMAVR_VERSION=${version}"; + installFlags = buildFlags + " DESTDIR=$(out)"; + + postFixup = '' + target="$out/bin/simavr" + patchelf --set-rpath "$(patchelf --print-rpath "$target"):$out/lib" "$target" + ''; + + buildInputs = [ which git avrgcclibc libelf pkgconfig freeglut mesa ]; + + meta = with stdenv.lib; { + description = "A lean and mean Atmel AVR simulator"; + homepage = https://github.com/buserror/simavr; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ goodrone ]; + }; + +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0300fe6e3ee3..9f18e569a647 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9007,6 +9007,8 @@ in silgraphite = callPackage ../development/libraries/silgraphite {}; graphite2 = callPackage ../development/libraries/silgraphite/graphite2.nix {}; + simavr = callPackage ../development/tools/simavr { }; + simgear = callPackage ../development/libraries/simgear { }; simp_le = callPackage ../tools/admin/simp_le { };