From 0d7c0efa7d27c8399cdc3079f7a23144919bc286 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Tue, 15 Dec 2015 02:38:07 +0300 Subject: [PATCH] udisks2: fix udev rules file (close #11743) This properly hides system partitions (like EFI or Windows recovery) from UDisks. --- nixos/modules/services/hardware/udisks2.nix | 2 +- pkgs/os-specific/linux/udisks/2-default.nix | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/hardware/udisks2.nix b/nixos/modules/services/hardware/udisks2.nix index fd6d8886348e..ad5dc8e8a49b 100644 --- a/nixos/modules/services/hardware/udisks2.nix +++ b/nixos/modules/services/hardware/udisks2.nix @@ -39,7 +39,7 @@ with lib; mkdir -m 0755 -p /var/lib/udisks2 ''; - #services.udev.packages = [ pkgs.udisks2 ]; + services.udev.packages = [ pkgs.udisks2 ]; systemd.services.udisks2 = { description = "Udisks2 service"; diff --git a/pkgs/os-specific/linux/udisks/2-default.nix b/pkgs/os-specific/linux/udisks/2-default.nix index 060d9ad1dd32..35873b3a062f 100644 --- a/pkgs/os-specific/linux/udisks/2-default.nix +++ b/pkgs/os-specific/linux/udisks/2-default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, intltool +{ stdenv, fetchurl, pkgconfig, intltool, gnused , expat, acl, systemd, glib, libatasmart, polkit , libxslt, docbook_xsl, utillinux, mdadm, libgudev }: @@ -21,7 +21,11 @@ stdenv.mkDerivation rec { '' substituteInPlace src/main.c --replace \ "@path@" \ - "${utillinux}/bin:${mdadm}/sbin:/var/run/current-system/sw/bin:/var/run/current-system/sw/bin" + "${utillinux}/bin:${mdadm}/bin:/run/current-system/sw/bin" + substituteInPlace data/80-udisks2.rules \ + --replace "/bin/sh" "${stdenv.shell}" \ + --replace "/sbin/mdadm" "${mdadm}/bin/mdadm" \ + --replace " sed " " ${gnused}/bin/sed " ''; nativeBuildInputs = [ pkgconfig intltool ];