diff options
author | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-07-21 22:02:10 +0200 |
---|---|---|
committer | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-07-21 22:02:10 +0200 |
commit | 22585cdf070a6ce1831cff1a11e0a92884132277 (patch) | |
tree | f0bc94815154035b84b7c9c20585156a07600933 /custom | |
parent | ed8801ddec7a2a046231b34e1f84ad39fb26af48 (diff) | |
download | nixos-22585cdf070a6ce1831cff1a11e0a92884132277.tar nixos-22585cdf070a6ce1831cff1a11e0a92884132277.tar.gz nixos-22585cdf070a6ce1831cff1a11e0a92884132277.tar.bz2 nixos-22585cdf070a6ce1831cff1a11e0a92884132277.tar.xz nixos-22585cdf070a6ce1831cff1a11e0a92884132277.zip |
escape is futile
Diffstat (limited to 'custom')
-rw-r--r-- | custom/notify-user.nix | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/custom/notify-user.nix b/custom/notify-user.nix index 808d1615..e5f001f3 100644 --- a/custom/notify-user.nix +++ b/custom/notify-user.nix | |||
@@ -21,10 +21,7 @@ stdenv.mkDerivation { | |||
21 | forM_ envFiles $ \envFile -> do | 21 | forM_ envFiles $ \envFile -> do |
22 | sessionAddr <- tail . snd . break (== '=') . head . filter ("DBUS_SESSION_BUS_ADDRESS=" `isPrefixOf`) . lines <$> readFile envFile | 22 | sessionAddr <- tail . snd . break (== '=') . head . filter ("DBUS_SESSION_BUS_ADDRESS=" `isPrefixOf`) . lines <$> readFile envFile |
23 | setEnv "DBUS_SESSION_BUS_ADDRESS" sessionAddr | 23 | setEnv "DBUS_SESSION_BUS_ADDRESS" sessionAddr |
24 | callProcess "${libnotify}/bin/notify-send" =<< (++) <$> getArgs <*> (pure . concatMap escape . dropWhileEnd isSpace <$> getContents) | 24 | callProcess "${libnotify}/bin/notify-send" =<< (++) <$> getArgs <*> (pure . dropWhileEnd isSpace <$> getContents) |
25 | where | ||
26 | escape '\\' = "\\\\" | ||
27 | escape x = pure x | ||
28 | ''; }; | 25 | ''; }; |
29 | phases = [ "buildPhase" "installPhase" ]; | 26 | phases = [ "buildPhase" "installPhase" ]; |
30 | buildPhase = '' | 27 | buildPhase = '' |