nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 74 lines 1.6 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 makeWrapper, 5 rustPlatform, 6 marked-man, 7 coreutils, 8 vulkan-loader, 9 wayland, 10 pkg-config, 11 udev, 12 v4l-utils, 13 dbus, 14 nix-update-script, 15}: 16 17rustPlatform.buildRustPackage rec { 18 pname = "wluma"; 19 version = "4.10.0"; 20 21 src = fetchFromGitHub { 22 owner = "maximbaz"; 23 repo = "wluma"; 24 tag = version; 25 hash = "sha256-gO7l0VnOs6BoBxZKkkXyxiBP7JB+G8ScrfuADNveys4="; 26 }; 27 28 postPatch = '' 29 # Needs chmod and chgrp 30 substituteInPlace 90-wluma-backlight.rules --replace-fail \ 31 'RUN+="/bin/' 'RUN+="${coreutils}/bin/' 32 33 substituteInPlace wluma.service --replace-fail \ 34 'ExecStart=/usr/bin/wluma' 'ExecStart=${placeholder "out"}/bin/wluma' 35 ''; 36 37 cargoHash = "sha256-UFe+/qJ9jCJ0QtSeY9QFT8VPXQGWIG2tqay+WE2rhKU="; 38 39 nativeBuildInputs = [ 40 makeWrapper 41 pkg-config 42 rustPlatform.bindgenHook 43 marked-man 44 ]; 45 46 buildInputs = [ 47 udev 48 v4l-utils 49 vulkan-loader 50 dbus 51 ]; 52 53 postInstall = '' 54 wrapProgram $out/bin/wluma \ 55 --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ wayland ]}" 56 ''; 57 58 passthru.updateScript = nix-update-script { }; 59 60 meta = { 61 description = "Automatic brightness adjustment based on screen contents and ALS"; 62 homepage = "https://github.com/maximbaz/wluma"; 63 changelog = "https://github.com/maximbaz/wluma/releases/tag/${version}"; 64 license = lib.licenses.isc; 65 maintainers = with lib.maintainers; [ 66 yshym 67 jmc-figueira 68 atemu 69 Rishik-Y 70 ]; 71 platforms = lib.platforms.linux; 72 mainProgram = "wluma"; 73 }; 74}