Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 60 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 installShellFiles, 6 meson, 7 ninja, 8 pkg-config, 9 dbus, 10 hidapi, 11 udev, 12 testers, 13 nix-update-script, 14}: 15 16stdenv.mkDerivation (finalAttrs: { 17 pname = "dualsensectl"; 18 version = "0.7"; 19 20 src = fetchFromGitHub { 21 owner = "nowrep"; 22 repo = "dualsensectl"; 23 rev = "v${finalAttrs.version}"; 24 hash = "sha256-/EPFZWpa7U4fmcdX2ycFkPgaqlKEA2cD84LBkcvVVhc="; 25 }; 26 27 nativeBuildInputs = [ 28 installShellFiles 29 meson 30 ninja 31 pkg-config 32 ]; 33 34 buildInputs = [ 35 dbus 36 hidapi 37 udev 38 ]; 39 40 postInstall = '' 41 installShellCompletion --cmd dualsensectl \ 42 --bash ../completion/dualsensectl \ 43 --zsh ../completion/_dualsensectl 44 ''; 45 46 passthru = { 47 tests.version = testers.testVersion { package = finalAttrs.finalPackage; }; 48 updateScript = nix-update-script { }; 49 }; 50 51 meta = with lib; { 52 changelog = "https://github.com/nowrep/dualsensectl/releases/tag/v${finalAttrs.version}"; 53 description = "Linux tool for controlling PS5 DualSense controller"; 54 homepage = "https://github.com/nowrep/dualsensectl"; 55 license = licenses.gpl2Only; 56 mainProgram = "dualsensectl"; 57 maintainers = with maintainers; [ azuwis ]; 58 platforms = platforms.linux; 59 }; 60})