~kaction/config

ref: c10cf3188ec0105d4a436574abbb8f1b5dec8ea9 config/universe/mutt/default.nix -rw-r--r-- 854 bytes
c10cf318 — Dmitry Bogatov Add mutt into the universe 1 year, 23 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ mutt, perl, execline, rewrite-paths }:
let
  stage1 = mutt.override {
    gdbm = null;
    openssl = null;
    cyrus_sasl = null;
    gnupg = null;
    gpgme = null;
    kerberos = null;
    headerCache = false;
    sslSupport = false;
    saslSupport = false;
    gpgmeSupport = false;
    imapSupport = false;
    gssSupport = false;

    inherit perl;
  };
  stage2 = stage1.overrideAttrs (old: {
    configureFlags = old.configureFlags
      ++ [ "--disable-smtp" "--disable-pop" "--disable-nls" ];
    nativeBuildInputs = [ perl ];
  });
  stage3 = rewrite-paths {
    drv = stage2;
    postBuild = ''
      rm -f $out/bin/smime_keys

      mv $out/bin/mutt $out/bin/.mutt
      cat << EOF > $out/bin/mutt
      #!${execline}/bin/execlineb -WS0
      $out/bin/.mutt -F ${./muttrc} \$@
      EOF
      chmod +x $out/bin/mutt
    '';
  };
in stage3