dbus-broker: 29 -> 32

+65 -14
+65 -14
pkgs/os-specific/linux/dbus-broker/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, docutils, meson, ninja, pkg-config 2 - , dbus, linuxHeaders, systemd }: 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , docutils 5 + , meson 6 + , ninja 7 + , pkg-config 8 + , dbus 9 + , linuxHeaders 10 + , systemd 11 + }: 3 12 13 + let 14 + dep = { pname, version, hash, buildInputs ? [ ] }: 15 + stdenv.mkDerivation { 16 + inherit pname version; 17 + src = fetchFromGitHub { 18 + owner = "c-util"; 19 + repo = pname; 20 + rev = version; 21 + inherit hash; 22 + }; 23 + nativeBuildInputs = [ meson ninja pkg-config ]; 24 + inherit buildInputs; 25 + }; 26 + 27 + # These libraries are not used outside of dbus-broker. 28 + # 29 + # If that changes, we can always break them out, but they are essentially 30 + # part of the dbus-broker project, just in separate repositories. 31 + c-dvar = dep { pname = "c-dvar"; version = "v1"; hash = "sha256-P7y7gUHXQn2eyS6IcV7m7yGy4VGtQ2orgBkS7Y729ZY="; buildInputs = [ c-stdaux c-utf8 ]; }; 32 + c-ini = dep { pname = "c-ini"; version = "v1"; hash = "sha256-VKxoGexMcquakMmiH5IJt0382TjkV1FLncTSyEqf4X0="; buildInputs = [ c-list c-rbtree c-stdaux c-utf8 ]; }; 33 + c-list = dep { pname = "c-list"; version = "v3"; hash = "sha256-fp3EAqcbFCLaT2EstLSzwP2X13pi2EFpFAullhoCtpw="; }; 34 + c-rbtree = dep { pname = "c-rbtree"; version = "v3"; hash = "sha256-ExSPgNqhTjSwRgYfZOAyoaehOpFNHKFqPYkcCfptkrs="; buildInputs = [ c-stdaux ]; }; 35 + c-shquote = dep { pname = "c-shquote"; version = "v1"; hash = "sha256-Ze1enX0VJ6Xi5e4EhWzaiHc7PnuaifrUP+JuJnauv5c="; buildInputs = [ c-stdaux ]; }; 36 + c-stdaux = dep { pname = "c-stdaux"; version = "v1"; hash = "sha256-/D+IFdqn1XHDfdOsDnLMO5IHQ5B4P4ELyMpRcPBg/4s="; }; 37 + c-utf8 = dep { pname = "c-utf8"; version = "v1"; hash = "sha256-QEnjmfQ6kxJdsHfyRgXAlP+oGrKLYQ0m9r+D2L+pizI="; buildInputs = [ c-stdaux ]; }; 38 + 39 + in 4 40 stdenv.mkDerivation rec { 5 41 pname = "dbus-broker"; 6 - version = "29"; 42 + version = "32"; 7 43 8 44 src = fetchFromGitHub { 9 - owner = "bus1"; 10 - repo = "dbus-broker"; 11 - rev = "v${version}"; 12 - sha256 = "1abbi8c0mgdqjidlp2wnmy0a88xv173hq88sh5m966c5r1h6alkq"; 13 - fetchSubmodules = true; 45 + owner = "bus1"; 46 + repo = "dbus-broker"; 47 + rev = "v${version}"; 48 + hash = "sha256-PVdRyg/t6D3HjSHeap5L8AiEm39iSO5qXohLw2UAUYY="; 14 49 }; 15 50 16 51 nativeBuildInputs = [ docutils meson ninja pkg-config ]; 17 52 18 - buildInputs = [ dbus linuxHeaders systemd ]; 53 + buildInputs = [ 54 + c-dvar 55 + c-ini 56 + c-list 57 + c-rbtree 58 + c-shquote 59 + c-stdaux 60 + c-utf8 61 + dbus 62 + linuxHeaders 63 + systemd 64 + ]; 19 65 20 - mesonFlags = [ "-D=system-console-users=gdm,sddm,lightdm" ]; 66 + mesonFlags = [ 67 + # while we technically support 4.9 and 4.14, the NixOS module will throw an 68 + # error when using a kernel that's too old 69 + "-D=linux-4-17=true" 70 + "-D=system-console-users=gdm,sddm,lightdm" 71 + ]; 21 72 22 73 PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system"; 23 74 PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user"; 24 75 PKG_CONFIG_SYSTEMD_CATALOGDIR = "${placeholder "out"}/lib/systemd/catalog"; 25 76 26 77 postInstall = '' 27 - install -Dm644 $src/README.md $out/share/doc/dbus-broker/README 78 + install -Dm444 $src/README.md $out/share/doc/dbus-broker/README 28 79 29 80 sed -i $out/lib/systemd/{system,user}/dbus-broker.service \ 30 81 -e 's,^ExecReload.*busctl,ExecReload=${systemd}/bin/busctl,' ··· 34 85 35 86 meta = with lib; { 36 87 description = "Linux D-Bus Message Broker"; 37 - homepage = "https://github.com/bus1/dbus-broker/wiki"; 38 - license = licenses.asl20; 39 - platforms = platforms.linux; 88 + homepage = "https://github.com/bus1/dbus-broker/wiki"; 89 + license = licenses.asl20; 40 90 maintainers = with maintainers; [ peterhoeg ]; 91 + platforms = platforms.linux; 41 92 }; 42 93 }