Unverified Commit f46f95fb authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #311254 from azuwis/dualsensectl

dualsensectl: migrate to pkgs/by-name and other enhancements
parents e4086f54 4c0f9d57
Loading
Loading
Loading
Loading
+21 −16
Original line number Diff line number Diff line
{ 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;
  };
}
})
+0 −2
Original line number Diff line number Diff line
@@ -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 { };