1{ fetchFromGitHub
2, lib
3, libnl
4, libpcap
5, pkg-config
6, stdenv
7}:
8stdenv.mkDerivation rec {
9 pname = "nmrpflash";
10 version = "0.9.22";
11
12 src = fetchFromGitHub {
13 owner = "jclehner";
14 repo = "nmrpflash";
15 rev = "v${version}";
16 sha256 = "sha256-gr/7tZYnuXFvfIUh2MmtgSbFoELTomQ4h05y/WFDhjo=";
17 };
18
19 nativeBuildInputs = [ pkg-config ];
20
21 buildInputs = [ libnl libpcap ];
22
23 PREFIX = "${placeholder "out"}";
24 STANDALONE_VERSION = version;
25
26 preInstall = ''
27 mkdir -p $out/bin
28 '';
29
30 meta = with lib; {
31 description = "Netgear Unbrick Utility";
32 homepage = "https://github.com/jclehner/nmrpflash";
33 license = licenses.gpl3;
34 maintainers = with maintainers; [ dadada ];
35 platforms = platforms.unix;
36 };
37}