diff options
author | Vladimír Čunát <v@cunat.cz> | 2019-09-04 11:00:56 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2019-09-04 11:00:56 +0200 |
commit | 4aad2947f8d680f18e5b01e115cf8cff22186998 (patch) | |
tree | a7a3d020efc6ec7be822bc06e08eca3ac311c9e2 /pkgs/os-specific | |
parent | 2c5835b09a1d4966756212902d36b1b8ab242da6 (diff) | |
parent | 1d8a3973f46a2d1360f855eaa0f3a19859771793 (diff) |
Merge branch 'master' into staging-next
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/openrazer/driver.nix | 39 | ||||
-rw-r--r-- | pkgs/os-specific/linux/upower/default.nix | 6 |
2 files changed, 42 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/openrazer/driver.nix b/pkgs/os-specific/linux/openrazer/driver.nix new file mode 100644 index 000000000000..355108f56e46 --- /dev/null +++ b/pkgs/os-specific/linux/openrazer/driver.nix @@ -0,0 +1,39 @@ +{ coreutils +, fetchFromGitHub +, kernel +, stdenv +, utillinux +}: + +let + common = import ../../../development/python-modules/openrazer/common.nix { inherit stdenv fetchFromGitHub; }; +in +stdenv.mkDerivation (common // { + name = "openrazer-${common.version}-${kernel.version}"; + + nativeBuildInputs = kernel.moduleBuildDependencies; + + buildFlags = [ + "KERNELDIR=${kernel.dev}/lib/modules/${kernel.version}/build" + ]; + + installPhase = '' + binDir="$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/hid" + mkdir -p "$binDir" + cp -v driver/*.ko "$binDir" + RAZER_MOUNT_OUT="$out/bin/razer_mount" + RAZER_RULES_OUT="$out/etc/udev/rules.d/99-razer.rules" + install -m 644 -v -D install_files/udev/99-razer.rules $RAZER_RULES_OUT + install -m 755 -v -D install_files/udev/razer_mount $RAZER_MOUNT_OUT + substituteInPlace $RAZER_RULES_OUT \ + --replace razer_mount $RAZER_MOUNT_OUT + substituteInPlace $RAZER_MOUNT_OUT \ + --replace /usr/bin/logger ${utillinux}/bin/logger \ + --replace chgrp ${coreutils}/bin/chgrp \ + --replace "PATH='/sbin:/bin:/usr/sbin:/usr/bin'" "" + ''; + + meta = common.meta // { + description = "An entirely open source Linux driver that allows you to manage your Razer peripherals on GNU/Linux"; + }; +}) diff --git a/pkgs/os-specific/linux/upower/default.nix b/pkgs/os-specific/linux/upower/default.nix index 1836748d5fcf..59e39f72f510 100644 --- a/pkgs/os-specific/linux/upower/default.nix +++ b/pkgs/os-specific/linux/upower/default.nix @@ -43,9 +43,9 @@ stdenv.mkDerivation { "--localstatedir=/var" ] ++ stdenv.lib.optional useSystemd [ - "--with-systemdsystemunitdir=${placeholder ''out''}/etc/systemd/system" - "--with-systemdutildir=${placeholder ''out''}/lib/systemd" - "--with-udevrulesdir=${placeholder ''out''}/lib/udev/rules.d" + "--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system" + "--with-systemdutildir=${placeholder "out"}/lib/systemd" + "--with-udevrulesdir=${placeholder "out"}/lib/udev/rules.d" ] ; |