Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 104 lines 2.0 kB view raw
1{ 2 stdenv, 3 lib, 4 meson, 5 ninja, 6 pkg-config, 7 fetchFromGitLab, 8 fetchpatch, 9 python3, 10 umockdev, 11 gobject-introspection, 12 dbus, 13 asciidoc, 14 libxml2, 15 libxslt, 16 docbook_xml_dtd_45, 17 docbook-xsl-nons, 18 glib, 19 systemd, 20 polkit, 21 udevCheckHook, 22}: 23 24stdenv.mkDerivation rec { 25 pname = "bolt"; 26 version = "0.9.8"; 27 28 src = fetchFromGitLab { 29 domain = "gitlab.freedesktop.org"; 30 owner = "bolt"; 31 repo = "bolt"; 32 rev = version; 33 hash = "sha256-sDPipSIT2MJMdsOjOQSB+uOe6KXzVnyAqcQxPPr2NsU="; 34 }; 35 36 patches = [ 37 # Test does not work on ZFS with atime disabled. 38 # Upstream issue: https://gitlab.freedesktop.org/bolt/bolt/-/issues/167 39 (fetchpatch { 40 url = "https://gitlab.freedesktop.org/bolt/bolt/-/commit/c2f1d5c40ad71b20507e02faa11037b395fac2f8.diff"; 41 revert = true; 42 hash = "sha256-6w7ll65W/CydrWAVi/qgzhrQeDv1PWWShulLxoglF+I="; 43 }) 44 ]; 45 46 depsBuildBuild = [ 47 pkg-config 48 ]; 49 50 nativeBuildInputs = [ 51 asciidoc 52 docbook_xml_dtd_45 53 docbook-xsl-nons 54 libxml2 55 libxslt 56 meson 57 ninja 58 pkg-config 59 glib 60 udevCheckHook 61 ]; 62 63 buildInputs = [ 64 polkit 65 systemd 66 ]; 67 68 preCheck = '' 69 export LD_LIBRARY_PATH=${umockdev.out}/lib/ 70 ''; 71 72 nativeCheckInputs = [ 73 dbus 74 gobject-introspection 75 umockdev 76 (python3.pythonOnBuildForHost.withPackages (p: [ 77 p.pygobject3 78 p.dbus-python 79 p.python-dbusmock 80 ])) 81 ]; 82 83 postPatch = '' 84 patchShebangs scripts tests 85 ''; 86 87 mesonFlags = [ 88 "-Dlocalstatedir=/var" 89 ]; 90 91 doInstallCheck = true; 92 93 PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system"; 94 PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev"; 95 96 meta = with lib; { 97 description = "Thunderbolt 3 device management daemon"; 98 mainProgram = "boltctl"; 99 homepage = "https://gitlab.freedesktop.org/bolt/bolt"; 100 license = licenses.lgpl21Plus; 101 maintainers = with maintainers; [ callahad ]; 102 platforms = platforms.linux; 103 }; 104}