Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 rustPlatform, 4 fetchFromGitHub, 5 pkg-config, 6 cairo, 7 gdk-pixbuf, 8 glib, 9 libinput, 10 librsvg, 11 libxml2, 12 pango, 13 udev, 14 udevCheckHook, 15}: 16 17rustPlatform.buildRustPackage rec { 18 pname = "tiny-dfr"; 19 version = "0.3.5"; 20 21 src = fetchFromGitHub { 22 owner = "AsahiLinux"; 23 repo = "tiny-dfr"; 24 tag = "v${version}"; 25 hash = "sha256-G4OeYZH3VF6fKWxHYLTmwzQmQ4JupgYNH/6aJSgINvg="; 26 }; 27 28 cargoHash = "sha256-/PtoAc2ZNJfW5gegcFQAAlEmjSMysZ+QebVfHtW35Nk="; 29 30 nativeBuildInputs = [ 31 pkg-config 32 udevCheckHook 33 ]; 34 buildInputs = [ 35 cairo 36 gdk-pixbuf 37 glib 38 libinput 39 librsvg 40 libxml2 41 pango 42 udev 43 ]; 44 45 postConfigure = '' 46 substituteInPlace etc/systemd/system/tiny-dfr.service \ 47 --replace-fail /usr/bin $out/bin 48 substituteInPlace src/*.rs --replace-quiet /usr/share $out/share 49 ''; 50 51 postInstall = '' 52 cp -R etc $out/lib 53 cp -R share $out 54 ''; 55 56 doInstallCheck = true; 57 58 meta = with lib; { 59 homepage = "https://github.com/AsahiLinux/tiny-dfr"; 60 description = "Most basic dynamic function row daemon possible"; 61 license = [ 62 licenses.asl20 63 licenses.mit 64 ]; 65 mainProgram = "tiny-dfr"; 66 maintainers = [ maintainers.qyliss ]; 67 platforms = platforms.linux; 68 }; 69}