nixpkgs/pkgs/development/compilers/gavrasm/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchzip, fpc , lang ? "en" } :
2022-01-20 19:24:13 +01:00
assert lib.assertOneOf "lang" lang ["cn" "de" "en" "fr" "tr"];
2022-01-20 19:24:13 +01:00
2020-01-21 23:13:36 +01:00
stdenv.mkDerivation rec {
pname = "gavrasm";
2022-09-19 16:41:24 +02:00
version = "5.4";
2022-01-20 19:24:13 +01:00
flatVersion = lib.strings.replaceStrings ["."] [""] version;
2020-01-21 23:13:36 +01:00
src = fetchzip {
2022-01-20 19:24:13 +01:00
url = "http://www.avr-asm-tutorial.net/gavrasm/v${flatVersion}/gavrasm_sources_lin_${flatVersion}.zip";
2022-09-19 16:41:24 +02:00
sha256 = "sha256-uTalb8Wzn2RAoUKZx9RZFCX+V9HUEtUnJ4eSltFumh0=";
2020-01-21 23:13:36 +01:00
stripRoot=false;
};
nativeBuildInputs = [ fpc ];
configurePhase = ''
2022-01-20 19:24:13 +01:00
runHook preConfigure
2020-01-21 23:13:36 +01:00
cp gavrlang_${lang}.pas gavrlang.pas
2022-01-20 19:24:13 +01:00
runHook postConfigure
2020-01-21 23:13:36 +01:00
'';
buildPhase = ''
2022-01-20 19:24:13 +01:00
runHook preBuild
2020-01-21 23:13:36 +01:00
fpc gavrasm.pas
2022-01-20 19:24:13 +01:00
runHook postBuild
2020-01-21 23:13:36 +01:00
'';
installPhase = ''
2022-01-20 19:24:13 +01:00
runHook preInstall
2020-01-21 23:13:36 +01:00
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
2022-01-20 19:24:13 +01:00
runHook postInstall
2020-01-21 23:13:36 +01:00
'';
meta = with lib; {
2022-01-20 19:24:13 +01:00
homepage = "http://www.avr-asm-tutorial.net/gavrasm/";
2020-01-21 23:13:36 +01:00
description = "AVR Assembler for ATMEL AVR-Processors";
license = licenses.unfree;
maintainers = with maintainers; [ mafo ];
platforms = platforms.linux;
};
}