udisks2: fix udev rules file (close #11743)

This properly hides system partitions (like EFI or Windows recovery) from UDisks.
This commit is contained in:
Nikolay Amiantov 2015-12-15 02:38:07 +03:00 committed by Vladimír Čunát
parent d856841ba4
commit 0d7c0efa7d
2 changed files with 7 additions and 3 deletions

View File

@ -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";

View File

@ -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 ];