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

72 lines
1.6 KiB
Nix
Raw Normal View History

2018-08-25 14:26:52 +02:00
{ stdenv, fetchgit, autoreconfHook, 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-09-23 14:26:55 +02:00
rev = "0.10";
sha256 = "1yzbx4l3a6hbdmirgbvnrjfiwflyzd38mbxnp23gn9hg3ni3br34";
2017-04-23 23:12:21 +02:00
};
in stdenv.mkDerivation rec {
2018-03-07 19:05:08 +01:00
name = "iwd-${version}";
2018-09-23 14:26:55 +02:00
version = "0.8";
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-09-23 14:26:55 +02:00
sha256 = "0bx31f77mz3rbl3xja48lb5zgwgialg7hvax889kpkz92wg26mgv";
2017-04-23 23:12:21 +02:00
};
nativeBuildInputs = [
autoreconfHook
python3Packages.wrapPython
];
buildInputs = [
readline
python3Packages.python
];
2018-03-07 19:05:08 +01:00
pythonPath = [
python3Packages.dbus-python
python3Packages.pygobject3
];
enableParallelBuilding = true;
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 ];
};
}