2021-02-01 09:05:09 +01:00
|
|
|
{ lib, stdenv, runtimeShell, fetchurl, unzip, mono, avrdude, gtk2, xdg-utils }:
|
2014-05-31 16:23:02 +02:00
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2014-05-31 16:23:02 +02:00
|
|
|
name = "avrdudess-2.2.20140102";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://blog.zakkemble.co.uk/download/avrdudess_20140102.zip";
|
|
|
|
sha256 = "18llpvjsfhypzijrvfbzmcg3g141f307mzsrg11wcdxh9syxqak6";
|
|
|
|
};
|
|
|
|
|
2021-02-20 22:01:53 +01:00
|
|
|
nativeBuildInputs = [ unzip ];
|
2014-05-31 16:23:02 +02:00
|
|
|
|
|
|
|
phases = [ "buildPhase" ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
mkdir -p "$out/avrdudess"
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
|
|
|
|
unzip "$src" -d "$out/avrdudess"
|
|
|
|
|
|
|
|
cat >> "$out/bin/avrdudess" << __EOF__
|
2019-02-26 12:45:54 +01:00
|
|
|
#!${runtimeShell}
|
2021-01-15 06:42:41 +01:00
|
|
|
export LD_LIBRARY_PATH="${lib.makeLibraryPath [gtk2 mono]}"
|
2014-05-31 16:23:02 +02:00
|
|
|
# We need PATH from user env for xdg-open to find its tools, which
|
|
|
|
# typically depend on the currently running desktop environment.
|
2021-02-01 09:05:09 +01:00
|
|
|
export PATH="${lib.makeBinPath [ avrdude xdg-utils ]}:\$PATH"
|
2014-05-31 16:23:02 +02: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 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2014-05-31 16:23:02 +02:00
|
|
|
description = "GUI for AVRDUDE (AVR microcontroller programmer)";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/zkemble/AVRDUDESS";
|
2014-05-31 16:23:02 +02:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|