about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/networking/sleep-on-lan/default.nix
blob: 6a332ea8070caa16e45e303f051e58c5f457a254 (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
34
{ buildGoModule
, fetchFromGitHub
, lib
}:

buildGoModule rec {
  pname = "sleep-on-lan";
  version = "1.1.1";

  src = fetchFromGitHub {
    owner = "SR-G";
    repo = pname;
    rev = "${version}-RELEASE";
    sha256 = "sha256-WooFGIdXIIoJPMqmPpnT+bc+P+IARMSxa3CvXY9++mw=";
  };

  sourceRoot = "${src.name}/src";
  vendorHash = "sha256-JqDDG53khtDdMLVOscwqi0oGviF+3DMkv5tkHvp1gJc=";

  ldflags = [
    "-s"
    "-w"
    "-X main.BuildVersion=${version}"
    "-X main.BuildVersionLabel=nixpkgs"
  ];

  meta = with lib; {
    homepage = "https://github.com/SR-G/sleep-on-lan";
    description = "Multi-platform process allowing to sleep on LAN a linux or windows computer, through wake-on-lan (reversed) magic packets or through HTTP REST requests.";
    license = licenses.asl20;
    platforms = platforms.linux;
    maintainers = with maintainers; [ devusb ];
  };
}