{ lib, rustPlatform, fetchFromGitHub, pkg-config, installShellFiles, udev, coreutils, }: rustPlatform.buildRustPackage rec { pname = "surface-control"; version = "0.4.8-1"; src = fetchFromGitHub { owner = "linux-surface"; repo = "surface-control"; tag = "v${version}"; hash = "sha256-ZooqPlvxx+eBFEIf9Y1iU6zhhgafGUw28G5cwdF/E78="; }; cargoHash = "sha256-gv/ipOQ1kmLc9YxxwuXc/rq6YUdVw2FhrI9C+DHxIDM="; nativeBuildInputs = [ pkg-config installShellFiles ]; buildInputs = [ udev ]; postInstall = '' installShellCompletion \ $releaseDir/build/surface-*/out/surface.{bash,fish} \ --zsh $releaseDir/build/surface-*/out/_surface ''; meta = { description = "Control various aspects of Microsoft Surface devices on Linux from the Command-Line"; homepage = "https://github.com/linux-surface/surface-control"; license = lib.licenses.mit; maintainers = [ ]; platforms = lib.platforms.linux; mainProgram = "surface"; }; }