mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-18 01:54:34 +00:00
Merge pull request #130551 from leifhelm/mixxx
mixxx: Fix udev rules installation
This commit is contained in:
commit
fb7b11e545
@ -1,4 +1,5 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, mkDerivation
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
@ -116,6 +117,23 @@ mkDerivation rec {
|
||||
"--set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive"
|
||||
];
|
||||
|
||||
# mixxx installs udev rules to DATADIR instead of SYSCONFDIR
|
||||
# let's disable this and install udev rules manually via postInstall
|
||||
# see https://github.com/mixxxdj/mixxx/blob/2.3.0/CMakeLists.txt#L1381-L1392
|
||||
cmakeFlags = [
|
||||
"-DINSTALL_USER_UDEV_RULES=OFF"
|
||||
];
|
||||
|
||||
postInstall = lib.optionalString stdenv.isLinux ''
|
||||
rules="$src/res/linux/mixxx-usb-uaccess.rules"
|
||||
if [ ! -f "$rules" ]; then
|
||||
echo "$rules is missing, must update the Nix file."
|
||||
exit 1
|
||||
fi
|
||||
mkdir -p "$out/lib/udev/rules.d"
|
||||
cp "$rules" "$out/lib/udev/rules.d/69-mixxx-usb-uaccess.rules"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://mixxx.org";
|
||||
description = "Digital DJ mixing software";
|
||||
|
Loading…
Reference in New Issue
Block a user