about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/embedded/arduino/arduinoOTA/default.nix
blob: 92da1a77f18ef8b2ef3cd706b5e3b8804f3c8a8a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ lib
, buildGoModule
, fetchFromGitHub
, nix-update-script
}:
buildGoModule rec {
  pname = "arduinoOTA";
  version = "1.4.1";

  src = fetchFromGitHub {
    owner = "arduino";
    repo = pname;
    rev = version;
    hash = "sha256-HaNMkeV/PDEotYp8+rUKFaBxGbZO8qA99Yp2sa6glz8=";
  };

  vendorHash = null;

  postPatch = ''
    substituteInPlace version/version.go \
      --replace 'versionString        = ""' 'versionString        = "${version}"'
  '';

  passthru.updateScript = nix-update-script { };

  meta = with lib; {
    homepage = "https://github.com/arduino/arduinoOTA";
    description = "A tool for uploading programs to Arduino boards over a network";
    license = licenses.gpl3;
    maintainers = with maintainers; [ poelzi ];
    platforms = platforms.all;
  };
}