summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ymir/mlmmj-expose.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/ymir/mlmmj-expose.nix b/ymir/mlmmj-expose.nix
index b3eab046..bcf3a872 100644
--- a/ymir/mlmmj-expose.nix
+++ b/ymir/mlmmj-expose.nix
@@ -41,7 +41,7 @@ let
41 setCurrentDirectory listDir 41 setCurrentDirectory listDir
42 identities <- getIdentities 42 identities <- getIdentities
43 subscribers <- getSubscribers 43 subscribers <- getSubscribers
44 let hashes = filter ((==) extension . snd) [((ident, sub), take len $ hash' (ident, sub)) | ident <- identities, sub <- subscribers] 44 let hashes = filter ((==) extension . snd) [((ident, sub), hash' (ident, sub)) | ident <- identities, sub <- subscribers]
45 case hashes of 45 case hashes of
46 [(_, recipient)] -> do 46 [(_, recipient)] -> do
47 getContents >>= writeFile "queue/exposed" 47 getContents >>= writeFile "queue/exposed"
@@ -82,10 +82,10 @@ let
82 readDir dir = concat <$> (mapM (fmap lines . readFile) . map (dir </>) . filter (not . (`elem` [".", ".."]))=<< (getDirectoryContents dir)) 82 readDir dir = concat <$> (mapM (fmap lines . readFile) . map (dir </>) . filter (not . (`elem` [".", ".."]))=<< (getDirectoryContents dir))
83 83
84 hash' :: Show a => a -> String 84 hash' :: Show a => a -> String
85 hash' = map toLower . show . (hash :: BS.ByteString -> Digest SHA256) . CBS.pack . map toLower . show 85 hash' = take len . map toLower . show . (hash :: BS.ByteString -> Digest SHA256) . CBS.pack . map toLower . show
86 86
87 len :: Int 87 len :: Int
88 len = 16 88 len = 64
89 ''; 89 '';
90 buildCommand = '' 90 buildCommand = ''
91 mkdir -p $out/bin 91 mkdir -p $out/bin