Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 replaceVars,
6 autoreconfHook,
7 iodine,
8 intltool,
9 pkg-config,
10 networkmanager,
11 libsecret,
12 gtk3,
13 withGnome ? true,
14 unstableGitUpdater,
15 libnma,
16 glib,
17}:
18
19stdenv.mkDerivation {
20 pname = "NetworkManager-iodine${lib.optionalString withGnome "-gnome"}";
21 version = "1.2.0-unstable-2024-11-02";
22
23 src = fetchFromGitLab {
24 domain = "gitlab.gnome.org";
25 owner = "GNOME";
26 repo = "network-manager-iodine";
27 rev = "dd633f80913ae637d6f496bae1b7bac8c297860c";
28 sha256 = "sAndI8jjCcRENDGz4V3AKswybzC8PDzYPaEN1mLcti8=";
29 };
30
31 patches = [
32 (replaceVars ./fix-paths.patch {
33 inherit iodine;
34 })
35 ];
36
37 nativeBuildInputs = [
38 intltool
39 autoreconfHook
40 pkg-config
41 glib
42 ];
43
44 buildInputs = [
45 iodine
46 networkmanager
47 glib
48 ]
49 ++ lib.optionals withGnome [
50 gtk3
51 libsecret
52 libnma
53 ];
54
55 configureFlags = [
56 "--with-gnome=${if withGnome then "yes" else "no"}"
57 "--localstatedir=/" # needed for the management socket under /run/NetworkManager
58 "--enable-absolute-paths"
59 ];
60
61 preConfigure = ''
62 intltoolize
63 '';
64
65 passthru = {
66 updateScript = unstableGitUpdater {
67 tagPrefix = "v";
68 };
69
70 networkManagerPlugin = "VPN/nm-iodine-service.name";
71 };
72
73 meta = with lib; {
74 description = "NetworkManager's iodine plugin";
75 inherit (networkmanager.meta) maintainers teams platforms;
76 license = licenses.gpl2Plus;
77 };
78}