Merge pull request #311254 from azuwis/dualsensectl

dualsensectl: migrate to pkgs/by-name and other enhancements
This commit is contained in:
Weijia Wang 2024-05-13 10:55:22 +02:00 committed by GitHub
commit f46f95fb3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 18 deletions

View File

@ -1,20 +1,23 @@
{ lib {
, stdenv lib,
, fetchFromGitHub stdenv,
, pkg-config fetchFromGitHub,
, dbus pkg-config,
, hidapi dbus,
, udev hidapi,
udev,
testers,
nix-update-script,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "dualsensectl"; pname = "dualsensectl";
version = "0.5"; version = "0.5";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "nowrep"; owner = "nowrep";
repo = "dualsensectl"; repo = "dualsensectl";
rev = "v${version}"; rev = "v${finalAttrs.version}";
hash = "sha256-+OSp9M0A0J4nm7ViDXG63yrUZuZxR7gyckwSCdy3qm0="; hash = "sha256-+OSp9M0A0J4nm7ViDXG63yrUZuZxR7gyckwSCdy3qm0=";
}; };
@ -22,9 +25,7 @@ stdenv.mkDerivation rec {
substituteInPlace Makefile --replace "/usr/" "/" substituteInPlace Makefile --replace "/usr/" "/"
''; '';
nativeBuildInputs = [ nativeBuildInputs = [ pkg-config ];
pkg-config
];
buildInputs = [ buildInputs = [
dbus dbus
@ -32,11 +33,15 @@ stdenv.mkDerivation rec {
udev udev
]; ];
makeFlags = [ makeFlags = [ "DESTDIR=$(out)" ];
"DESTDIR=$(out)"
]; passthru = {
tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
updateScript = nix-update-script { };
};
meta = with lib; { meta = with lib; {
changelog = "https://github.com/nowrep/dualsensectl/releases/tag/v${finalAttrs.version}";
description = "Linux tool for controlling PS5 DualSense controller"; description = "Linux tool for controlling PS5 DualSense controller";
homepage = "https://github.com/nowrep/dualsensectl"; homepage = "https://github.com/nowrep/dualsensectl";
license = licenses.gpl2Only; license = licenses.gpl2Only;
@ -44,4 +49,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ azuwis ]; maintainers = with maintainers; [ azuwis ];
platforms = platforms.linux; platforms = platforms.linux;
}; };
} })

View File

@ -1758,8 +1758,6 @@ with pkgs;
donkey = callPackage ../tools/security/donkey { }; donkey = callPackage ../tools/security/donkey { };
dualsensectl = callPackage ../tools/games/dualsensectl { };
dwarfs = callPackage ../tools/filesystems/dwarfs { }; dwarfs = callPackage ../tools/filesystems/dwarfs { };
dysk = callPackage ../tools/filesystems/dysk { }; dysk = callPackage ../tools/filesystems/dysk { };