From 02a30bea44edf1116dcab16c5e64501312b2927b Mon Sep 17 00:00:00 2001 From: Moritz Ulrich Date: Tue, 25 Mar 2014 16:48:19 +0100 Subject: [PATCH] Fix services.udisks.enable. Latest update to udisks in 344f2e65 broke it for me. Fix it by doing the following: - Add udisks.service to /etc/systemd/system (via systemd.packages) - Fix path to udisks-daemon in udisks.service (libexec/ instead of lib/) --- nixos/modules/services/hardware/udisks.nix | 2 ++ pkgs/os-specific/linux/udisks/1-default.nix | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/nixos/modules/services/hardware/udisks.nix b/nixos/modules/services/hardware/udisks.nix index 531ee192573a..a3527468cce6 100644 --- a/nixos/modules/services/hardware/udisks.nix +++ b/nixos/modules/services/hardware/udisks.nix @@ -40,6 +40,8 @@ with pkgs.lib; ''; services.udev.packages = [ pkgs.udisks ]; + + systemd.packages = [ pkgs.udisks ]; }; } diff --git a/pkgs/os-specific/linux/udisks/1-default.nix b/pkgs/os-specific/linux/udisks/1-default.nix index 19cfec9f0657..485880f0cbb9 100644 --- a/pkgs/os-specific/linux/udisks/1-default.nix +++ b/pkgs/os-specific/linux/udisks/1-default.nix @@ -19,6 +19,11 @@ stdenv.mkDerivation rec { substituteInPlace src/main.c --replace \ "/sbin:/bin:/usr/sbin:/usr/bin" \ "${utillinux}/bin:${mdadm}/sbin:/var/run/current-system/sw/bin:/var/run/current-system/sw/sbin" + + # For some reason @libexec@ is set to 'lib/' when building. + # Passing --libexecdir in configureFlags didn't help. + substituteInPlace data/systemd/udisks.service.in \ + --replace "@libexecdir@" "$out/libexec" ''; buildInputs =