about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/embedded/nmrpflash/default.nix
blob: 323e54578a7b9aa765ebf9e63a5a9989cca0293f (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
35
36
37
{ fetchFromGitHub
, lib
, libnl
, libpcap
, pkg-config
, stdenv
}:
stdenv.mkDerivation rec {
  pname = "nmrpflash";
  version = "0.9.21";

  src = fetchFromGitHub {
    owner  = "jclehner";
    repo   = "nmrpflash";
    rev    = "v${version}";
    sha256 = "sha256-nW+VD2a0vmgODbJi4H8Esnq502bEkeCKjXQi23DfdqA=";
  };

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [ libnl libpcap ];

  PREFIX = "${placeholder "out"}";
  STANDALONE_VERSION = version;

  preInstall = ''
    mkdir -p $out/bin
  '';

  meta = with lib; {
    description = "Netgear Unbrick Utility";
    homepage = "https://github.com/jclehner/nmrpflash";
    license = licenses.gpl3;
    maintainers = with maintainers; [ dadada ];
    platforms = platforms.unix;
  };
}