~jb55/citadel

ref: f8cfb4a1b176c9a1421e5225659dfcdf3932e9e8 citadel/nix-config/nixpkgs/config.nix -rw-r--r-- 11.1 KiB
f8cfb4a1William Casarin nix: patch neomutt to always show cursor 5 months 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
{ pkgs }:
let #monstercatPkgs = import <monstercatpkgs> { inherit pkgs; };
    #haskellOverrides = import ./haskell-overrides { inherit monstercatPkgs; };
    jb55pkgs = import <jb55pkgs> { inherit pkgs; };
    callPackage = pkgs.callPackage;
    doJailbreak = pkgs.haskell.lib.doJailbreak;
    dontCheck = pkgs.haskell.lib.dontCheck;
    regularFiles = builtins.filterSource (f: type: type == "symlink"
                                                || type == "directory"
                                                || type == "regular");
in {
  allowUnfree = true;
  allowUnfreeRedistributable = true;
  allowBroken = false;
  checkMeta = true;
  zathura.useMupdf = true;


  packageOverrides = super: rec {
    qemu = super.qemu.override {
      smbdSupport = true;
    };

    scream-receivers = super.scream-receivers.override {
      pulseSupport = true;
    };

    # /run/current-system/sw/bin/ls $HOME/.emacs.d/elpa | sed 's/-[[:digit:]].*//g;s/\+$/-plus/g' | sort -u
    #emacs = super.emacsHead;
    nur = import (builtins.fetchTarball {
      url = "https://github.com/nix-community/NUR/archive/cff4dfbe6d6f4ab14560234fcf2d73332ee3ecc1.tar.gz";
      sha256 = "01yxz6w820vryirrwkmsnxkmvp35dncjp1n8fdfsq4n0r28nw31a";
    }) {
      inherit pkgs;
    };

    less = pkgs.lib.overrideDerivation super.less (attrs: {
      patches = [
        (super.fetchurl {
          url = "https://jb55.com/s/0001-mark-save-lastmarks.patch";
          sha256 = "4974a406ddcdc46c2008b9a828d9eba3a04b8a46ed02ca5e5534b2f09441a709";
	})
      ];
    });

    msmtp = pkgs.lib.overrideDerivation super.msmtp (attrs: {
      patches = [
        (super.fetchurl {
          url = "https://jb55.com/s/msmtpq-custom-conn-test.patch";
          sha256 = "4d342ea9e757fe5f3fd939479c4b619dcc9630ba9d0bdacf5ccfec9b5b67b861";
        })
      ];
    });

    neomutt = pkgs.lib.overrideDerivation super.neomutt (attrs: {
      postConfigure = ''
        sed -i '/HAVE_CURS_SET 1/d' config.h
      '';
    });

    weechat = super.weechat.override {configure = {availablePlugins, ...}: {
        scripts = with super.weechatScripts; [ wee-slack ];
      };
    };

    dunst = pkgs.lib.overrideDerivation super.dunst (attrs: {
      src = pkgs.fetchFromGitHub {
        owner = "jb55";
        repo  = "dunst";
        rev   = "138edff170e4e4a2bf6891bd634c4ec215d4b7ef";
        sha256 = "1pf3v4mrcd0cfhvm9fk9nwvgj5dy6qlbs0mhlcyx26cbqxd62brp";
      };
    });

    lastpass-cli = super.lastpass-cli.override { guiSupport = true; };

    wine = super.wineWowPackages.staging;

    dasht = super.lib.overrideDerivation super.dasht (attrs: {
      src = pkgs.fetchFromGitHub {
        owner  = "sunaku";
        repo   = "dasht";
        sha256 = "1i4gc68aypa0fk94ssy2gzakcn2qlmp9qf427km6fxbjx15qsbjn";
        rev    = "issue-45";
      };
    });

    phonectl = super.python3Packages.callPackage (import (super.fetchFromGitHub {
      owner  = "jb55";
      repo   = "phonectl";
      sha256 = "0wqpwg32qa1rzpw7881r6q2zklxlq1y4qgyyy742pihfh99rkcmj";
      rev    = "de0f37a20d16a32a73f9267860302357b2df0c20";
    })) {};

    notmuch = pkgs.lib.overrideDerivation super.notmuch (attrs: {
      src = pkgs.fetchFromGitHub {
        owner  = "jb55";
        repo   = "notmuch";
        rev    = "f0f99973ad9d4e932b34cc76a5d7c6629079575a";
        sha256 = "0n89q4vlq0yhn6dqjjb7sva54cvg62hcj1yxryvs5jai5n5gl493";
      };

      doCheck = false;
    });

    # wirelesstools =
    #   let
    #     patch = super.fetchurl {
    #               url    = "https://jb55.com/s/iwlist-print-scanning-info-allocation-failed.patch";
    #               sha256 = "31c97c6abf3f0073666f9f94f233fae2fcb8990aae5e7af1030af980745a8efc";
    #             };
    #   in
    #     pkgs.lib.overrideDerivation super.wirelesstools (attrs: {
    #       prePatch = ''
    #         patch -p0 < ${patch}
    #       '';
    #     });

    #dmenu2 = pkgs.lib.overrideDerivation super.dmenu2 (attrs: {
    #  patchs =
    #    [ (super.fetchurl
    #      { url = "https://jb55.com/s/404ad3952cc5ccf3.patch";
    #        sha1 = "404ad3952cc5ccf3aa0674f31a70ef0e446a8d49";
    #      })
    #    ];
    #});

    #htop = pkgs.lib.overrideDerivation super.htop (attrs: {
    #  patches =
    #    [ (super.fetchurl
    #      { url = "https://jb55.com/s/htop-vim.patch";
    #        sha256 = "3d72aa07d28d7988e91e8e4bc68d66804a4faeb40b93c7a695c97f7d04a55195";
    #      })

    #      (super.fetchurl
    #      { url = "https://jb55.com/s/0001-Improving-Command-display-sort.patch";
    #        sha256 = "2207dccce7f9de0c3c6f56d846d7e547c96f63c8a4659ef46ef90c3bd9a013d1";
    #      })
    #    ];
    #});

    ds4ctl = super.callPackage ./scripts/ds4ctl { };

    haskellEnvHoogle = haskellEnvFun {
      name = "haskellEnvHoogle";
      #compiler = "ghc821";
      withHoogle = true;
    };

    haskellEnv = haskellEnvFun {
      name = "haskellEnv";
      #compiler = "ghc821";
      withHoogle = false;
    };

    haskell-tools = super.buildEnv {
      name = "haskell-tools";
      paths = haskellTools super.haskellPackages;
    };

    jb55-tools-env = pkgs.buildEnv {
      name = "jb55-tools";
      paths = with jb55pkgs; [
        csv-delim
        csv-scripts
        dbopen
        extname
        mandown
        snap
        sharefile
        samp
      ];
    };

    jvm-tools-env = pkgs.buildEnv {
      name = "jvm-tools";
      paths = with pkgs; [
        gradle
        maven
        oraclejdk
      ];
    };

    gaming-env = pkgs.buildEnv {
      name = "gaming";
      paths = with pkgs; [
        steam
      ];
    };

    file-tools = pkgs.buildEnv {
      name = "file-tools";
      paths = with pkgs; [
        ripgrep
        ranger
      ];
    };

    network-tools = pkgs.buildEnv {
      name = "network-tools";
      paths = with pkgs; with xorg; [
        nmap
        dnsutils
        whois
        nethogs
      ];
    };

    system-tools = pkgs.buildEnv {
      name = "system-tools";
      paths = with pkgs; with xorg; [
        xbacklight
        acpi
        psmisc
      ];
    };

    desktop-tools = pkgs.buildEnv {
      name = "desktop-tools";
      paths = with pkgs; with xorg; [
        twmn
        libnotify
      ];
    };

    syntax-tools = pkgs.buildEnv {
      name = "syntax-tools";
      paths = with pkgs; [
        shellcheck
      ];
    };

    mail-tools = pkgs.buildEnv {
      name = "mail-tools";
      paths = with pkgs; [
        notmuch
        msmtp
        muchsync
        isync
      ];
    };

    photo-env = pkgs.buildEnv {
      name = "photo-tools";
      paths = with pkgs; [
        gimp
        darktable
        rawtherapee
        ufraw
        dcraw
      ];
    };

    git-tools = pkgs.buildEnv {
      name = "git-tools";
      paths = with pkgs; [
        diffstat
        diffutils
        gist
        git-series
        gitAndTools.git-extras
        gitAndTools.git-absorb
        gitAndTools.delta
        gitAndTools.gitFull
        github-release
        patch
        patchutils
      ];
    };

    haskellEnvFun = { withHoogle ? false, compiler ? null, name }:
      let hp = if compiler != null
                 then super.haskell.packages.${compiler}
                 else super.haskellPackages;

          ghcWith = if withHoogle
                      then hp.ghcWithHoogle
                      else hp.ghcWithPackages;

      in super.buildEnv {
        name = name;
        paths = [(ghcWith myHaskellPackages)];
      };

    haskellTools = hp: with hp; [
      alex
      cabal-install
      cabal2nix
      #stack2nix
      hpack
      ghc-core
      happy
      (dontCheck hasktags)
      hindent
      hlint
      structured-haskell-mode
      haskell-ci
    ];

    myHaskellPackages = hp: with hp; [
      #(doJailbreak pandoc-lens)
      (dontCheck (doJailbreak serialise))
      Boolean
      Decimal
      HTTP
      HUnit
      MissingH
      QuickCheck
      SafeSemaphore
      aeson
      aeson-qq
      async
      attoparsec
      # base32-bytestring
      base32string
      base58-bytestring
      bifunctors
      # bitcoin-api
      # bitcoin-api-extra
      unliftio
      # bitcoin-block
      # bitcoin-script
      # bitcoin-tx
      blaze-builder
      blaze-builder-conduit
      blaze-html
      blaze-markup
      blaze-textual
      # bson-lens
      #bytestring-show
      cased
      cassava
      cereal
      clientsession
      clientsession
      colour
      comonad
      comonad-transformers
      #compact-string-fix
      #cryptohash
      directory
      dlist
      dlist-instances
      doctest
      either
      elm-export
      elm-export-persistent
      exceptions
      filepath
      fingertree
      foldl
      formatting
      free
      generics-sop
      hamlet
      hashable
      hashids
      here
      heroku
      hedgehog
      hspec
      hspec-expectations
      html
      http-client
      http-date
      http-types
      inline-c
      io-memoize
      io-storage
      keys
      language-c
      language-javascript
      lens
      lens-action
      lens-aeson
      lens-datetime
      lens-family
      lens-family-core
      lifted-async
      lifted-base
      linear
      list-extras
      # list-t
      logict
      mbox
      mime-mail
      mime-types
      miso
      mmorph
      monad-control
      monad-coroutine
      monad-loops
      monad-par
      monad-par-extras
      monad-stm
      monadloc
      # mongoDB
      monoid-extras
      neat-interpolation
      network
      newtype
      numbers
      options
      optparse-applicative
      optparse-generic
      pandoc
      parsec
      megaparsec
      parsers
      pcg-random
      persistent
      persistent-postgresql
      persistent-template
      posix-paths
      #postgresql-binary
      postgresql-simple
      pretty-show
      probability
      profunctors
      pwstore-fast
      quickcheck-instances
      random
      reducers
      reflection
      regex-applicative
      regex-base
      regex-compat
      regex-posix
      relational-record
      resourcet
      retry
      rex
      s3-signer
      safe
      #sbv
      scotty
      sqlite-simple
      lucid
      semigroupoids
      semigroups
      #servant
      #servant-cassava
      #servant-client
      #servant-docs
      #servant-lucid
      #servant-server
      shake
      shakespeare
      #shelly
      shqq
      simple-reflect
      #speculation
      split
      spoon
      stache
      stm
      stm-chans
      #stm-stats
      store
      stache
      streaming
      smtp-mail
      streaming-bytestring
      streaming-wai
      strict
      stringsearch
      strptime
      syb
      system-fileio
      system-filepath
      tagged
      taggy
      taggy-lens
      tar
      tardis
      tasty
      tasty-hspec
      tasty-hunit
      tasty-quickcheck
      tasty-smallcheck
      temporary
      test-framework
      test-framework-hunit
      text
      # text-format
      text-regex-replace
      thyme
      time
      time-units
      #tinytemplate
      transformers
      transformers-base
      turtle
      unagi-chan
      uniplate
      unix-compat
      unordered-containers
      uuid
      vector
      void
      wai
      wai-middleware-static
      wai-extra
      warp
      wreq
      xhtml
      xml-lens
      yaml
      zippers
      zlib
    ];
  };
}