nixpkgs-suyu/pkgs/os-specific/linux/iwd/default.nix

74 lines
1.7 KiB
Nix
Raw Normal View History

2018-11-10 18:08:23 +01:00
{ stdenv, fetchgit, autoreconfHook, pkgconfig, coreutils, readline, python3Packages }:
2017-04-23 23:12:21 +02:00
let
ell = fetchgit {
url = https://git.kernel.org/pub/scm/libs/ell/ell.git;
2018-11-10 18:08:23 +01:00
rev = "0.14";
sha256 = "13jlmdk47pscmfs3c12awfwr3m6ka4fh6fyr9cl1bmqdpwqmmmk6";
2017-04-23 23:12:21 +02:00
};
in stdenv.mkDerivation rec {
2018-03-07 19:05:08 +01:00
name = "iwd-${version}";
2018-11-10 18:08:23 +01:00
version = "0.11";
2017-04-23 23:12:21 +02:00
src = fetchgit {
url = https://git.kernel.org/pub/scm/network/wireless/iwd.git;
2018-03-07 19:05:08 +01:00
rev = version;
2018-11-10 18:08:23 +01:00
sha256 = "0q79rdj3h16xdf0g2jdsvb2141z36z89vgzq0qn31pxzhgxdgf7j";
2017-04-23 23:12:21 +02:00
};
nativeBuildInputs = [
autoreconfHook
2018-11-10 18:08:23 +01:00
pkgconfig
python3Packages.wrapPython
];
buildInputs = [
readline
python3Packages.python
];
2018-03-07 19:05:08 +01:00
pythonPath = [
python3Packages.dbus-python
python3Packages.pygobject3
];
2018-11-23 16:20:19 +01:00
# Enable when it works again
enableParallelBuilding = false;
2017-04-23 23:12:21 +02:00
configureFlags = [
2018-03-07 19:05:08 +01:00
"--with-dbus-datadir=$(out)/etc/"
2018-08-25 14:26:52 +02:00
"--with-dbus-busdir=$(out)/usr/share/dbus-1/system-services/"
"--with-systemd-unitdir=$(out)/lib/systemd/system/"
"--localstatedir=/var/"
2017-04-23 23:12:21 +02:00
];
postUnpack = ''
ln -s ${ell} ell
patchShebangs .
2017-04-23 23:12:21 +02:00
'';
postInstall = ''
cp -a test/* $out/bin/
mkdir -p $out/share
cp -a doc $out/share/
cp -a README AUTHORS TODO $out/share/doc/
'';
2017-04-23 23:12:21 +02:00
preFixup = ''
wrapPythonPrograms
'';
2017-04-23 23:12:21 +02:00
2018-08-25 14:26:52 +02:00
postFixup = ''
substituteInPlace $out/usr/share/dbus-1/system-services/net.connman.iwd.service \
--replace /bin/false ${coreutils}/bin/false
'';
2017-04-23 23:12:21 +02:00
meta = with stdenv.lib; {
homepage = https://git.kernel.org/pub/scm/network/wireless/iwd.git;
description = "Wireless daemon for Linux";
license = licenses.lgpl21;
2017-04-23 23:12:21 +02:00
platforms = platforms.linux;
maintainers = [ maintainers.mic92 ];
};
}