2021-02-01 11:05:09 +03:00
|
|
|
{ lib, stdenv, runtimeShell, fetchurl, unzip, mono, avrdude, gtk2, xdg-utils }:
|
2014-05-31 18:23:02 +04:00
|
|
|
|
2019-08-14 00:52:01 +03:00
|
|
|
stdenv.mkDerivation {
|
2021-11-07 23:29:51 +03:00
|
|
|
pname = "avrdudess";
|
2024-02-13 10:53:33 +03:00
|
|
|
version = "2.17";
|
2014-05-31 18:23:02 +04:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-02-13 10:53:33 +03:00
|
|
|
url = "https://github.com/ZakKemble/AVRDUDESS/releases/download/v2.17/AVRDUDESS-2.17-portable.zip";
|
|
|
|
sha256 = "sha256-TcXXGDs75Q2ew+m2B/p00Y24O5aJQlp+3FcAn7GSVyI=";
|
2014-05-31 18:23:02 +04:00
|
|
|
};
|
|
|
|
|
2021-02-21 00:01:53 +03:00
|
|
|
nativeBuildInputs = [ unzip ];
|
2014-05-31 18:23:02 +04:00
|
|
|
|
2021-08-03 15:02:45 +03:00
|
|
|
dontUnpack = true;
|
|
|
|
dontInstall = true;
|
2014-05-31 18:23:02 +04:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
mkdir -p "$out/avrdudess"
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
|
|
|
|
unzip "$src" -d "$out/avrdudess"
|
|
|
|
|
|
|
|
cat >> "$out/bin/avrdudess" << __EOF__
|
2019-02-26 14:45:54 +03:00
|
|
|
#!${runtimeShell}
|
2021-01-15 08:42:41 +03:00
|
|
|
export LD_LIBRARY_PATH="${lib.makeLibraryPath [gtk2 mono]}"
|
2014-05-31 18:23:02 +04:00
|
|
|
# We need PATH from user env for xdg-open to find its tools, which
|
|
|
|
# typically depend on the currently running desktop environment.
|
2022-07-12 02:23:52 +03:00
|
|
|
export PATH="\$PATH:${lib.makeBinPath [ avrdude xdg-utils ]}"
|
2014-05-31 18:23:02 +04:00
|
|
|
|
|
|
|
# avrdudess must have its resource files in its current working directory
|
|
|
|
cd $out/avrdudess && exec ${mono}/bin/mono "$out/avrdudess/avrdudess.exe" "\$@"
|
|
|
|
__EOF__
|
|
|
|
|
|
|
|
chmod a+x "$out/bin/"*
|
|
|
|
'';
|
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2014-05-31 18:23:02 +04:00
|
|
|
description = "GUI for AVRDUDE (AVR microcontroller programmer)";
|
2022-03-23 13:22:53 +03:00
|
|
|
homepage = "https://blog.zakkemble.net/avrdudess-a-gui-for-avrdude/";
|
|
|
|
changelog = "https://github.com/ZakKemble/AVRDUDESS/blob/v${version}/Changelog.txt";
|
2014-05-31 18:23:02 +04:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
2024-02-11 05:19:15 +03:00
|
|
|
mainProgram = "avrdudess";
|
2014-05-31 18:23:02 +04:00
|
|
|
};
|
|
|
|
}
|