-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.nix
More file actions
39 lines (36 loc) · 853 Bytes
/
Copy pathpackage.nix
File metadata and controls
39 lines (36 loc) · 853 Bytes
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
38
39
{
pkgs ? import <nixpkgs> {},
lib,
stdenv,
...
}:
stdenv.mkDerivation rec {
name = "odhcpd";
pname = "odhcpd";
version = "master";
## DhcpV6
# src = pkgs.fetchgit {
# url = "git://git.openwrt.org/project/odhcpd.git";
# # url = "https://git.openwrt.org/project/odhcpd.git";
# hash = "sha256-WfFR/BU78O+aNoIXIFkwKtLqL8DD0Du38bIE0xPMXXg=";
# };
src = pkgs.fetchFromGitHub {
owner = "openwrt";
repo = "odhcpd";
# rev = "v${version}";
rev = "${version}";
sha256 = "sha256-WfFR/BU78O+aNoIXIFkwKtLqL8DD0Du38bIE0xPMXXg=";
};
nativeBuildInputs = with pkgs; [pkg-config cmake libnl libnl-tiny libubox uci];
configurePhase = ''
mkdir build
cmake -B build -S .
'';
buildPhase = ''
cmake --build build
'';
installPhase = ''
mkdir -p $out/bin
cp build/odhcpd $out/bin
'';
}