about summary refs log tree commit diff
path: root/pkgs/sternenseemann/default.nix
blob: ec4ef79340ba8ed28511875cf65cb5b1a0cdbec1 (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
127
128
129
130
131
132
133
134
135
136
137
{ 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
      ;
  };

in

lib.fix (self: {
  # nix utilities
  lib = callPackage ./lib { };

  buildGitTarball = callPackage ./build-git-tarball {
    inherit getBins;
  };

  bundleSignedReleases = callPackage ./bundle-signed-release {
    inherit getBins;
    inherit (self) buildGitTarball;
  };

  # packaged sterniware
  inherit (haskellPackages) emoji-generic;

  logbook = ocamlPackages.callPackage ./logbook { };

  inherit (rust)
    nix-env-diff
    temp
    ;

  schmecgit = callPackage ./schmecgit {
    inherit (pkgs.llvmPackages_latest) stdenv;
  };

  scripts = dontRecurseIntoAttrs (callPackage ./scripts {
    inherit (writers) writeBashBin;
    inherit (self) shakti;
    inherit getBins;
  });

  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";
    };
  };

  unicode_clock = python3Packages.callPackage ./unicode_clock { };

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

  # patched packages
  mandoc = pkgs.mandoc.overrideAttrs (old: rec {
    src = pkgs.fetchcvs {
      date = "2021-08-08";
      sha256 = "0g3hzhngklgxcyfc7mp6gq129chhgkl6z0i7r872iri4d9dq59sg";
      cvsRoot = "anoncvs@mandoc.bsd.lv:/cvs";
      module = "mandoc";
    };
    patches = [];
    version = "unstable-${src.date}"; # actually early but idc
    # fix makewhatis(1) skipping all man pages that
    # are symlinks to /nix/store
    preConfigure = old.preConfigure + ''
      echo READ_ALLOWED_PATH=\"${builtins.storeDir}\" >> configure.local
    '';
  });

  pass = (pkgs.pass.override {
    waylandSupport = true;
    x11Support = false;
    dmenuSupport = true;
  }).overrideAttrs (old: {
    postPatch = old.postPatch + ''
      substituteInPlace "contrib/dmenu/passmenu" \
        --replace "dmenu-wl" "${bins.bemenu}"
    '';
  });

  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;
  };

  # packaged 3rd party software
  saneterm = pkgs.python39Packages.callPackage ./saneterm { };

  shakti = callPackage ./shakti { };

  t = python3Packages.callPackage ./t { };
})