11{
22 lib ,
3- stdenv ,
43 fetchFromGitHub ,
54 makeWrapper ,
65 rustPlatform ,
1716
1817rustPlatform . buildRustPackage rec {
1918 pname = "wluma" ;
20- version = "4.6.1 " ;
19+ version = "4.9.0 " ;
2120
2221 src = fetchFromGitHub {
2322 owner = "maximbaz" ;
2423 repo = "wluma" ;
25- rev = version ;
26- sha256 = "sha256-ds/qBaQNyZ/HdetI1QdJOZcjVotz4xHgoIIuWI9xOEg =" ;
24+ tag = version ;
25+ hash = "sha256-K/AJP+2J+u83sCCbyXvCLh51Ip979nSnb0bjT22Y2+0 =" ;
2726 } ;
2827
2928 postPatch = ''
30- substituteInPlace Makefile --replace \
31- 'target/release/$(BIN)' \
32- 'target/${ stdenv . hostPlatform . rust . cargoShortTarget } /release/$(BIN)'
33-
3429 # Needs chmod and chgrp
35- substituteInPlace 90-wluma-backlight.rules --replace \
30+ substituteInPlace 90-wluma-backlight.rules --replace-fail \
3631 'RUN+="/bin/' 'RUN+="${ coreutils } /bin/'
3732
38- substituteInPlace wluma.service --replace \
33+ substituteInPlace wluma.service --replace-fail \
3934 'ExecStart=/usr/bin/wluma' 'ExecStart=${ placeholder "out" } /bin/wluma'
4035 '' ;
4136
4237 useFetchCargoVendor = true ;
43- cargoHash = "sha256-1zBp6eTkIDSMzNN5jKKu6lZVzzBJY+oB6y5UESlm/yA =" ;
38+ cargoHash = "sha256-+uJ9SytwucYiuzTwdKTAfHb81LyV9NZmGOlzm6Qjftw =" ;
4439
4540 nativeBuildInputs = [
4641 makeWrapper
@@ -56,31 +51,25 @@ rustPlatform.buildRustPackage rec {
5651 dbus
5752 ] ;
5853
59- postBuild = ''
60- make docs
61- '' ;
62-
63- dontCargoInstall = true ;
64- installFlags = [ "PREFIX=${ placeholder "out" } " ] ;
6554 postInstall = ''
6655 wrapProgram $out/bin/wluma \
6756 --prefix LD_LIBRARY_PATH : "${ lib . makeLibraryPath [ wayland ] } "
6857 '' ;
6958
7059 passthru . updateScript = nix-update-script { } ;
7160
72- meta = with lib ; {
61+ meta = {
7362 description = "Automatic brightness adjustment based on screen contents and ALS" ;
7463 homepage = "https://github.com/maximbaz/wluma" ;
7564 changelog = "https://github.com/maximbaz/wluma/releases/tag/${ version } " ;
76- license = licenses . isc ;
77- maintainers = with maintainers ; [
65+ license = lib . licenses . isc ;
66+ maintainers = with lib . maintainers ; [
7867 yshym
7968 jmc-figueira
8069 atemu
8170 Rishik-Y
8271 ] ;
83- platforms = platforms . linux ;
72+ platforms = lib . platforms . linux ;
8473 mainProgram = "wluma" ;
8574 } ;
8675}
0 commit comments