Merge pull request #155923 from c0bw3b/pkg/atmel_avr

Update AVR assemblers (avra & gavrasm)
This commit is contained in:
Renaud 2022-01-22 12:21:17 +01:00 committed by GitHub
commit f42a9e2586
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 20 deletions

View File

@ -1,28 +1,23 @@
{ lib, stdenv, fetchurl, autoconf, automake }:
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "avra";
version = "1.3.0";
version = "1.4.2";
src = fetchurl {
url = "mirror://sourceforge/avra/avra-${version}.tar.bz2";
sha256 = "04lp0k0h540l5pmnaai07637f0p4zi766v6sfm7cryfaca3byb56";
src = fetchFromGitHub {
owner = "Ro5bert";
repo = pname;
rev = version;
hash = "sha256-joOj89WZ9Si5fcu1w1VHj5fOcnB9N2313Yb29A+nCCY=";
};
buildInputs = [ autoconf automake ];
makeFlags = [ "PREFIX=${placeholder "out"}" ];
preConfigure = ''
cd src/
aclocal
autoconf
touch NEWS README AUTHORS ChangeLog
automake -a
'';
doCheck = true;
meta = with lib; {
description = "Assembler for the Atmel AVR microcontroller family";
homepage = "http://avra.sourceforge.net/";
homepage = "https://github.com/Ro5bert/avra";
license = licenses.gpl2Plus;
platforms = platforms.all;
};

View File

@ -1,36 +1,45 @@
{ lib, stdenv, fetchzip, fpc , lang ? "en" } :
assert lib.assertOneOf "lang" lang ["cn" "de" "en" "fr" "tr"];
stdenv.mkDerivation rec {
pname = "gavrasm";
version = "4.5";
version = "5.1";
flatVersion = lib.strings.replaceStrings ["."] [""] version;
src = fetchzip {
url ="http://www.avr-asm-tutorial.net/gavrasm/v45/gavrasm_sources_lin_45.zip";
sha256 = "1f5g5ran74pznwj4g7vfqh2qhymaj3p26f2lvzbmlwq447iid52c";
url = "http://www.avr-asm-tutorial.net/gavrasm/v${flatVersion}/gavrasm_sources_lin_${flatVersion}.zip";
sha256 = "0k94f8k4980wvhx3dpl1savpx4wqv9r5090l0skg2k8vlhsv58gf";
stripRoot=false;
};
nativeBuildInputs = [ fpc ];
configurePhase = ''
runHook preConfigure
cp gavrlang_${lang}.pas gavrlang.pas
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
fpc gavrasm.pas
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp gavrasm $out/bin
mkdir -p $out/doc
cp instr.asm $out/doc
cp ReadMe.Txt $out/doc
cp LiesMich.Txt $out/doc
runHook postInstall
'';
meta = with lib; {
homepage = "http://www.avr-asm-tutorial.net/gavrasm";
homepage = "http://www.avr-asm-tutorial.net/gavrasm/";
description = "AVR Assembler for ATMEL AVR-Processors";
license = licenses.unfree;
maintainers = with maintainers; [ mafo ];