Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 127 lines 2.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitLab, 5 docbook-xsl-nons, 6 docutils, 7 gi-docgen, 8 gobject-introspection, 9 gtk-doc, 10 libxslt, 11 meson, 12 ninja, 13 pkg-config, 14 vala, 15 wrapGAppsHook3, 16 glib, 17 gsound, 18 json-glib, 19 libgudev, 20 dbus, 21 gmobile, 22 umockdev, 23 feedbackd-device-themes, 24 udevCheckHook, 25 nix-update-script, 26}: 27 28stdenv.mkDerivation (finalAttrs: { 29 pname = "feedbackd"; 30 version = "0.8.3"; 31 32 outputs = [ 33 "out" 34 "dev" 35 "devdoc" 36 ]; 37 38 src = fetchFromGitLab { 39 domain = "gitlab.freedesktop.org"; 40 owner = "agx"; 41 repo = "feedbackd"; 42 rev = "v${finalAttrs.version}"; 43 hash = "sha256-ypKD9n9dC+0J+HFtL43mCky/ZXu4bgejYzw7nHHPAm4="; 44 }; 45 46 depsBuildBuild = [ 47 pkg-config 48 ]; 49 50 nativeBuildInputs = [ 51 docbook-xsl-nons 52 docutils # for rst2man 53 gi-docgen 54 gobject-introspection 55 gtk-doc 56 libxslt 57 meson 58 ninja 59 pkg-config 60 vala 61 wrapGAppsHook3 62 udevCheckHook 63 ]; 64 65 buildInputs = [ 66 glib 67 gsound 68 json-glib 69 libgudev 70 gmobile 71 ]; 72 73 mesonFlags = [ 74 "-Dgtk_doc=true" 75 "-Dman=true" 76 # Make compiling work when doCheck = false 77 "-Dtests=${lib.boolToString finalAttrs.finalPackage.doCheck}" 78 ]; 79 80 nativeCheckInputs = [ 81 dbus 82 umockdev 83 ]; 84 85 doCheck = true; 86 87 postInstall = '' 88 mkdir -p $out/lib/udev/rules.d 89 sed "s|/usr/libexec/|$out/libexec/|" < $src/data/90-feedbackd.rules > $out/lib/udev/rules.d/90-feedbackd.rules 90 ''; 91 92 postFixup = '' 93 # Move developer documentation to devdoc output. 94 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. 95 if [[ -d "$out/share/doc" ]]; then 96 find -L "$out/share/doc" -type f -regex '.*\.devhelp2?' -print0 \ 97 | while IFS= read -r -d ''' file; do 98 moveToOutput "$(dirname "''${file/"$out/"/}")" "$devdoc" 99 done 100 fi 101 ''; 102 103 doInstallCheck = true; 104 105 passthru = { 106 updateScript = nix-update-script { }; 107 }; 108 109 strictDeps = true; 110 111 meta = with lib; { 112 description = "Theme based Haptic, Visual and Audio Feedback"; 113 homepage = "https://gitlab.freedesktop.org/agx/feedbackd/"; 114 license = with licenses; [ 115 # feedbackd 116 gpl3Plus 117 118 # libfeedback library 119 lgpl21Plus 120 ]; 121 maintainers = with maintainers; [ 122 pacman99 123 Luflosi 124 ]; 125 platforms = platforms.linux; 126 }; 127})