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