2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, runtimeShell, fetchurl, unzip, mono, avrdude, gtk2, xdg-utils }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "avrdudess";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "2.14";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-06-16 17:23:12 +00:00
|
|
|
url = "https://github.com/ZakKemble/AVRDUDESS/releases/download/v2.14/AVRDUDESS-2.14-portable.zip";
|
|
|
|
sha256 = "sha256-x3xcsJLBJVO8XdV4OUveZ4KLqN5z/z0FsNLbGHSNoHs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
nativeBuildInputs = [ unzip ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
dontUnpack = true;
|
|
|
|
dontInstall = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
mkdir -p "$out/avrdudess"
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
|
|
|
|
unzip "$src" -d "$out/avrdudess"
|
|
|
|
|
|
|
|
cat >> "$out/bin/avrdudess" << __EOF__
|
|
|
|
#!${runtimeShell}
|
2021-01-15 22:18:51 +00:00
|
|
|
export LD_LIBRARY_PATH="${lib.makeLibraryPath [gtk2 mono]}"
|
2020-04-24 23:36:52 +00:00
|
|
|
# We need PATH from user env for xdg-open to find its tools, which
|
|
|
|
# typically depend on the currently running desktop environment.
|
2022-08-21 13:32:41 +00:00
|
|
|
export PATH="\$PATH:${lib.makeBinPath [ avrdude xdg-utils ]}"
|
2020-04-24 23:36:52 +00: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-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "GUI for AVRDUDE (AVR microcontroller programmer)";
|
2022-03-30 09:31:56 +00:00
|
|
|
homepage = "https://blog.zakkemble.net/avrdudess-a-gui-for-avrdude/";
|
|
|
|
changelog = "https://github.com/ZakKemble/AVRDUDESS/blob/v${version}/Changelog.txt";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|