8 rustPlatform.buildRustPackage rec {
12 src = fetchFromGitLab {
16 hash = "sha256-ie5JPHBvypUtPStwA/aO4GeQ/qbHTzUJF3T4QuW6JNc=";
19 cargoHash = "sha256-qZC4axeRnKgUNGDFzmdvN/mwkcqsh8KwLlM6oGT19e8=";
22 substituteInPlace data/supergfxd.service --replace /usr/bin/supergfxd $out/bin/supergfxd
23 substituteInPlace data/99-nvidia-ac.rules --replace /usr/bin/systemctl ${systemd}/bin/systemctl
26 nativeBuildInputs = [ pkg-config ];
27 buildInputs = [ systemd ];
29 # upstream doesn't have tests, don't build twice just to find that out
33 install -Dm444 -t $out/lib/udev/rules.d/ data/*.rules
34 install -Dm444 -t $out/share/dbus-1/system.d/ data/org.supergfxctl.Daemon.conf
35 install -Dm444 -t $out/lib/systemd/system/ data/supergfxd.service
39 description = "GPU switching utility, mostly for ASUS laptops";
40 homepage = "https://gitlab.com/asus-linux/supergfxctl";
41 license = licenses.mpl20;
42 platforms = [ "x86_64-linux" ];
43 maintainers = [ maintainers.k900 ];