about summary refs log tree commit diff
path: root/pkgs/sternenseemann/default.nix
blob: cb0ca26933f96fdec84bb9e0cd2e79c04a26c86f (plain) (blame)
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
{ pkgs, lib, profpatsch }:

let
  inherit (pkgs)
    callPackage
    dontRecurseIntoAttrs
    fetchurl
    fetchFromGitHub
    ocamlPackages
    python3Packages
    writers
    haskell
    ;

  inherit (profpatsch)
    getBins
    ;

  bins = getBins pkgs.bemenu [ "bemenu" ];

  haskellPackages = pkgs.haskellPackages.override {
    overrides = self: super: {
      emoji-generic = haskell.lib.overrideSrc
        (self.callPackage ./emoji-generic { }) {
          src = fetchFromGitHub {
            owner = "sternenseemann";
            repo = "emoji-generic";
            rev = "59355e813fb01487011d0b6d1408b5c789434fc1";
            sha256 = "0sk7fhh6n2k684lzic5z23kyk7i91k33j38wkk41xd92cv3xzsss";
          };
          version = "unstable-2021-03-26";
        };
    };
  };

  rust = callPackage ./rust {
    inherit (profpatsch)
      writeRustSimpleBin
      writeRustSimpleLib
      testRustSimple
      ;
  };

in

lib.fix (self: {
  inherit (haskellPackages) emoji-generic;

  lib = callPackage ./lib { };

  logbook = ocamlPackages.callPackage ./logbook { };

  mandoc = pkgs.mandoc.overrideAttrs (old: rec {
    src = pkgs.fetchcvs {
      sha256 = "19cqasw7fjsmhshs5khxrv8w3vdhf8xadls70l0gzqn7cyjmgsb9";
      date = "2021-02-07";
      cvsRoot = "anoncvs@mandoc.bsd.lv:/cvs";
      module = "mandoc";
    };
    version = "unstable-${src.date}"; # actually early but idc
    # fix makewhatis(1) skipping all man pages that
    # are symlinks to /nix/store
    patches = [ ./patches/mandoc-nix-store.patch ];
    patchFlags = [ "-p0" ];
    preConfigure = old.preConfigure + ''
      echo NIXSTOREDIR="$(dirname "$out")" >> configure.local
    '';
  });

  pass = (pkgs.pass.override {
    waylandSupport = true;
    x11Support = false;
  }).overrideAttrs (old: {
    patches = old.patches ++ [ ./patches/passmenu-wayland.patch ];
    postPatch = ''
      ${old.postPatch}
      substituteInPlace "contrib/dmenu/passmenu" \
        --replace "bemenu" "'${bins.bemenu} -l10'"
    '';
    postInstall = ''
      ${old.postInstall}
      cp "contrib/dmenu/passmenu" "$out/bin/"
    '';
  });

  inherit (rust)
    temp
    nix-env-diff
    ;

  # don't bother hydra with trivial text substitution
  scripts = dontRecurseIntoAttrs (callPackage ./scripts {
    inherit (writers) writeBashBin;
    inherit (self) shakti;
    inherit getBins;
  });

  shakti = callPackage ./shakti { };

  t = python3Packages.callPackage ./t { };

  tep = callPackage ./tep {
    inherit (haskellPackages)
      emoji-generic text utf8-light
      attoparsec bytestring;
    inherit (writers) writeBashBin writeHaskell;
    emojiTestTxt = fetchurl {
      url = "https://www.unicode.org/Public/emoji/13.1/emoji-test.txt";
      sha256 = "0n6d31533l1gnb1sxz8z486kv6rsggcpxyiq8wc1ald8l89c6g4f";
    };
  };

  texlive = pkgs.texlive.combine {
    inherit (pkgs.texlive)
      scheme-medium minted titlesec units collection-bibtexextra wrapfig
      libertine enumitem dashrule ifmtarg xstring xgreek adjustbox
      collectbox csquotes biblatex-philosophy quoting breakurl;
  };

  unicode_clock = python3Packages.callPackage ./unicode_clock { };

  vuizvui-update-programs-sqlite = python3Packages.callPackage ./vuizvui-update-programs-sqlite {
    inherit (pkgs.writers) writePython3;
    inherit (profpatsch) getBins;
  };
})