nixpkgs/pkgs/applications/misc/avrdudess/default.nix

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

47 lines
1.4 KiB
Nix
Raw Normal View History

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