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

View File

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