nixpkgs/pkgs/development/tools/simavr/default.nix
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00

45 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, libelf, which, pkg-config, freeglut
, avrgcc, avrlibc
, libGLU, libGL
, GLUT }:
stdenv.mkDerivation rec {
pname = "simavr";
version = "1.5";
src = fetchFromGitHub {
owner = "buserror";
repo = "simavr";
rev = "e0d4de41a72520491a4076b3ed87beb997a395c0";
sha256 = "0b2lh6l2niv80dmbm9xkamvnivkbmqw6v97sy29afalrwfxylxla";
};
makeFlags = [
"DESTDIR=$(out)"
"PREFIX="
"AVR_ROOT=${avrlibc}/avr"
"SIMAVR_VERSION=${version}"
"AVR=avr-"
];
NIX_CFLAGS_COMPILE = [ "-Wno-error=stringop-truncation" ];
nativeBuildInputs = [ which pkg-config avrgcc ];
buildInputs = [ libelf freeglut libGLU libGL ]
++ stdenv.lib.optional stdenv.isDarwin GLUT;
# Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" '';
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;
platforms = platforms.unix;
maintainers = with maintainers; [ goodrone ];
};
}