Fix jlink

This commit is contained in:
Artemis Tosini 2021-05-02 15:49:10 +00:00
parent 43236a3d56
commit 45e99af483
Signed by: artemist
GPG key ID: ADFFE553DCBB831E
2 changed files with 26 additions and 2 deletions

24
externals/packages/avarice/default.nix vendored Normal file
View file

@ -0,0 +1,24 @@
{ lib, stdenv, fetchurl, perl, libbfd, libusb-compat-0_1, hidapi }:
stdenv.mkDerivation rec {
pname = "avarice";
version = "2.14";
src = fetchurl {
url = "mirror://sourceforge/project/avarice/avarice/avarice-${version}/avarice-${version}.tar.bz2";
sha256 = "1ab2pxnkbw501iv1i9z9nj7hfzz4y7hid4l4q58cifm3aw17skjb";
};
nativeBuildInputs = [ perl ];
buildInputs = [ libbfd libusb-compat-0_1 hidapi ];
prePatch = ''
find src -type f -name '*.cc' -exec sed -i "s@ __unused@@g" {} \;
'';
meta = with lib; {
homepage = "http://avarice.sourceforge.net/";
description = "A program to facilitate AVR debugging using an Atmel or AVR ICE";
license = licenses.gpl2;
platforms = platforms.unix;
maintainers = [ maintainers.artemist ];
};
}

View file

@ -1,7 +1,7 @@
{ config, pkgs, ... }:
let
oldpkgs = import (fetchTarball "http://nixos.org/channels/nixos-20.03/nixexprs.tar.xz") { config.allowUnfree = true; };
jlink = oldpkgs.callPackage ../externals/packages/jlink { };
call = if (pkgs.targetPlatform.system == "x86_64-linux") then pkgs.pkgsi686Linux.callPackage else pkgs.callPackage;
jlink = call ../externals/packages/jlink { };
in
{
services.udev.packages = [