diff options
author | Vladimír Čunát <v@cunat.cz> | 2019-09-05 10:23:46 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2019-09-05 10:23:46 +0200 |
commit | e5dece4cbffc4d9859ef90d1489a16cfe52821a9 (patch) | |
tree | 2269f79964aaf9c3e127802125adf17f55312176 /pkgs/os-specific | |
parent | f75852d1647e3cd73412c9a541dfab5f7759fff3 (diff) | |
parent | e7cccdbb139ccf2f9f170500f40c04a6237a2da1 (diff) |
Merge branch 'staging-next' into staging
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/openrazer/driver.nix | 39 | ||||
-rw-r--r-- | pkgs/os-specific/linux/systemd/default.nix | 10 | ||||
-rw-r--r-- | pkgs/os-specific/linux/upower/default.nix | 6 |
3 files changed, 51 insertions, 4 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/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index ea82d92f17ae..4117df8cf13c 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, pkgconfig, intltool, gperf, libcap, kmod +{ stdenv, lib, fetchFromGitHub, fetchpatch, pkgconfig, intltool, gperf, libcap, kmod , xz, pam, acl, libuuid, m4, utillinux, libffi , glib, kbd, libxslt, coreutils, libgcrypt, libgpgerror, libidn2, libapparmor , audit, lz4, bzip2, libmicrohttpd, pcre2 @@ -28,6 +28,14 @@ stdenv.mkDerivation { sha256 = "0pyjvzzh8nnxv4z58n82lz1mjnzv44sylcjgkvw8sp35vx1ryxfh"; }; + patches = [ + (fetchpatch { + name = "CVE-2019-15718.patch"; + url = https://github.com/systemd/systemd/pull/13457/commits/35e528018f315798d3bffcb592b32a0d8f5162bd.patch; + sha256 = "0m0ypnnllx4r6a2qy1586as15i2qrzxwi1sqdp14rzdwajz1rvnv"; + }) + ]; + outputs = [ "out" "lib" "man" "dev" ]; nativeBuildInputs = 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" ] ; |