diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
commit | 62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch) | |
tree | c2630f69080637987b68acb1ee8676d2681fe304 /pkgs/os-specific/linux/joycond/default.nix | |
parent | d9c82ed3044c72cecf01c6ea042489d30914577c (diff) | |
parent | e24069138dfec3ef94f211f1da005bb5395adc11 (diff) | |
download | nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2 nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip |
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/os-specific/linux/joycond/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/joycond/default.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/joycond/default.nix b/pkgs/os-specific/linux/joycond/default.nix new file mode 100644 index 00000000000..a203073b081 --- /dev/null +++ b/pkgs/os-specific/linux/joycond/default.nix @@ -0,0 +1,37 @@ +{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libevdev, udev }: + +stdenv.mkDerivation rec { + pname = "joycond"; + version = "unstable-2021-03-27"; + + src = fetchFromGitHub { + owner = "DanielOgorchock"; + repo = "joycond"; + rev = "2d3f553060291f1bfee2e49fc2ca4a768b289df8"; + sha256 = "0dpmwspll9ar3pxg9rgnh224934par8h8bixdz9i2pqqbc3dqib7"; + }; + + nativeBuildInputs = [ cmake pkg-config ]; + buildInputs = [ libevdev udev ]; + + # CMake has hardcoded install paths + installPhase = '' + mkdir -p $out/{bin,etc/{systemd/system,udev/rules.d},lib/modules-load.d} + + cp ./joycond $out/bin + cp $src/udev/{89,72}-joycond.rules $out/etc/udev/rules.d + cp $src/systemd/joycond.service $out/etc/systemd/system + cp $src/systemd/joycond.conf $out/lib/modules-load.d + + substituteInPlace $out/etc/systemd/system/joycond.service --replace \ + "ExecStart=/usr/bin/joycond" "ExecStart=$out/bin/joycond" + ''; + + meta = with lib; { + homepage = "https://github.com/DanielOgorchock/joycond"; + description = "Userspace daemon to combine joy-cons from the hid-nintendo kernel driver"; + license = licenses.gpl3Only; + maintainers = [ maintainers.ivar ]; + platforms = platforms.linux; + }; +} |