2023-07-27 ideapad-perf on Nix Tags: nix{ stdenv , coreutils , python3 , fetchFromGitHub , libappindicator-gtk3 , gtk3 , gobject-introspection , wrapGAppsHook }: stdenv.mkDerivation rec { name = "ideapad-perf"; pname = "ideapad-perf"; version = "12"; src = fetchFromGitHub { owner = "korikori"; repo = pname; rev = "9c226ed0d52cb8ca52d83b04fd2ff464cd166460"; hash = "sha256-ouxtdmCotV5TYEI/hVGz6+yfK6VdExp8f4rmNpkaK98="; }; nativeBuildInputs = [ wrapGAppsHook gobject-introspection ]; buildInputs = [ gtk3 libappindicator-gtk3 (python3.withPackages (pkgs: with pkgs; [ pygobject3 ])) ]; postConfigure = '' substituteInPlace 81-ideapadperf.rules \ --replace "/usr/bin/chgrp" "${coreutils}/bin/chgrp" \ --replace "/usr/bin/chmod" "${coreutils}/bin/chmod" ''; installPhase = '' install -m755 -D ideapad-perf-tray.py $out/bin/ideapad-perf-tray.py install -m755 -D ideapad-perf $out/bin/ideapad-perf install -m644 -D 81-ideapadperf.rules $out/lib/udev/rules.d/81-ideapadperf.rules ''; }