4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
59 lines
1.7 KiB
Nix
59 lines
1.7 KiB
Nix
{ lib, stdenv, fetchFromGitLab, substituteAll, autoreconfHook, iodine, intltool, pkgconfig, networkmanager, libsecret, gtk3
|
|
, withGnome ? true, gnome3, fetchpatch, libnma, glib }:
|
|
|
|
let
|
|
pname = "NetworkManager-iodine";
|
|
version = "unstable-2019-11-05";
|
|
in stdenv.mkDerivation {
|
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
|
|
|
src = fetchFromGitLab {
|
|
domain = "gitlab.gnome.org";
|
|
owner = "GNOME";
|
|
repo = "network-manager-iodine";
|
|
rev = "2ef0abf089b00a0546f214dde0d45e63f2990b79";
|
|
sha256 = "1ps26fr9b1yyafj7lrzf2kmaxb0ipl0mhagch5kzrjdsc5xkajz7";
|
|
};
|
|
|
|
patches = [
|
|
(substituteAll {
|
|
src = ./fix-paths.patch;
|
|
inherit iodine;
|
|
})
|
|
# Don't use etc/dbus-1/system.d
|
|
(fetchpatch {
|
|
url = "https://gitlab.gnome.org/GNOME/network-manager-iodine/merge_requests/2.patch";
|
|
sha256 = "108pkf0mddj32s46k7jkmpwcaq2ylci4dqpp7wck3zm9q2jffff2";
|
|
})
|
|
];
|
|
|
|
buildInputs = [ iodine networkmanager glib ]
|
|
++ stdenv.lib.optionals withGnome [ gtk3 libsecret libnma ];
|
|
|
|
nativeBuildInputs = [ intltool autoreconfHook pkgconfig ];
|
|
|
|
# glib-2.62 deprecations
|
|
NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
|
|
|
|
preConfigure = "intltoolize";
|
|
configureFlags = [
|
|
"--without-libnm-glib"
|
|
"--with-gnome=${if withGnome then "yes" else "no"}"
|
|
"--localstatedir=/" # needed for the management socket under /run/NetworkManager
|
|
"--enable-absolute-paths"
|
|
];
|
|
|
|
passthru = {
|
|
updateScript = gnome3.updateScript {
|
|
packageName = pname;
|
|
attrPath = "networkmanager-iodine";
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "NetworkManager's iodine plugin";
|
|
inherit (networkmanager.meta) maintainers platforms;
|
|
license = licenses.gpl2Plus;
|
|
};
|
|
}
|