about summary refs log tree commit diff
path: root/overlays.nix
blob: da6161ae645e436e0b4b173a77d12a9fcc28689f (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
138
139
140
141
142
143
{
  inputs,
  lib,
  ...
}:
{
  default =
    final: prev:
    lib.infuse prev {
      bruh = _: prev.callPackage ./packages/bruh.nix { };

      emacsql-sqlite = _: prev.callPackage ./packages/emacsql-sqlite.nix { };

      git-extras.__output.postPatch.__append = ''
        substituteInPlace bin/git-setup \
          --replace 'Initial commit' 'chore: init'
      '';

      grc.__output = {
        version.__assign = "unstable-2021-08-12";
        src.__assign = final.fetchFromGitHub {
          owner = "garabik";
          repo = "grc";
          rev = "4d6a51fd78ad7e19af8dd12b2a828d1807267079";
          hash = "sha256-SmOZrgV0lgLryFoxADU15IKJ7jhxXar0MgbsV/z1GaE=";
        };
        patches.__append = [
          (final.fetchpatch {
            url = "https://patch-diff.githubusercontent.com/raw/garabik/grc/pull/214.patch";
            hash = "sha256-VNr9jl5oFbFNJbGsjflwFV3oTbCzJ0lBIZA4eyeoXLY=";
          })
        ];
      };

      hiccup = _: prev.callPackage ./packages/hiccup.nix { };

      lampray = _: prev.callPackage ./packages/lampray.nix { };

      # TODO Can this be infused?
      logcli =
        _:
        prev.grafana-loki.overrideAttrs (
          _: super: {
            pname = "logcli";
            subPackages = [ "cmd/logcli" ];
            nativeBuildInputs = (super.nativeBuildInputs or [ ]) ++ [ final.installShellFiles ];
            postInstall =
              (super.postInstall or "")
              + ''
                installShellCompletion --cmd logcli \
                  --bash <($out/bin/logcli --completion-script-bash) \
                  --zsh <($out/bin/logcli --completion-script-zsh)
              '';
            preFixup = null;
          }
        );

      myip = _: prev.callPackage ./packages/myip.nix { };

      nixfiles = _: prev.callPackage ./packages/nixfiles.nix { };

      nixfmt = _: prev.nixfmt-rfc-style;

      openssl_1_0_0 = _: prev.callPackage ./packages/openssl_1_0_0.nix { };

      # telegram-desktop = {
      #   __input.stdenv = stdenv: final.useMoldLinker stdenv;
      #   __output.patches.__append =
      #     let
      #       patches = "https://raw.githubusercontent.com/msva/mva-overlay/4c89938831bcce03fae22081809e53a47bdee31b/net-im/telegram-desktop/files/patches/0/conditional";
      #     in
      #     [
      #       (prev.fetchpatch {
      #         url = "${patches}/tdesktop_patches_hide-sponsored-messages/0000-data_data_sponsored_messages.cpp.patch";
      #         hash = "sha256-vVucKG0YNY41MVdqibhKfxL/2/nNPPtYw+otwat971U=";
      #       })
      #       (prev.fetchpatch {
      #         url = "${patches}/tdesktop_patches_allow-disable-stories/option-to-disable-stories.patch";
      #         hash = "sha256-ctL9wIn3cLtqgCcQFNnx7WQuBw+9IjDlMJUicmVt8no=";
      #       })
      #       (prev.fetchpatch {
      #         url = "${patches}/tdesktop_patches_hide-banned/0000_hide-messages-from-blocked-users.patch";
      #         hash = "sha256-61U3wQsUdLvB4ymHPjVecw9WvhW8W/V0Jf1cnvYUkHk=";
      #       })
      #     ];
      # };

      vesktop = {
        __input = {
          withSystemVencord = _: false;
          withTTS = _: false;
        };
        __output = {
          nativeBuildInputs.__append = [ final.imagemagick ];
          patches.__append = [ ./packages/vesktop.patch ];
          postInstall.__append = ''
            rm -rf $out/share/icons/hicolor/*
            for size in 1024 128 256 32 512 64; do
              convert -scale $size $src/build/icon.png $size.png
              install -Dm644 $size.png $out/share/icons/hicolor/''${size}x''${size}/apps/vesktop.png
            done
          '';
        };
      };

      # TODO Can this be infused?
      linuxPackages_latest =
        _:
        prev.linuxPackages_latest.extend (
          self: _: {
            amneziawg =
              inputs.nixpkgs-amneziawg.legacyPackages.${final.system}.linuxPackages_latest.amneziawg.override
                {
                  inherit (self) kernel;
                };
          }
        );
      linuxPackages_hardened =
        _:
        prev.linuxPackages_hardened.extend (
          self: _: {
            amneziawg =
              inputs.nixpkgs-amneziawg.legacyPackages.${final.system}.linuxPackages_hardened.amneziawg.override
                {
                  inherit (self) kernel;
                };
          }
        );
      linuxPackages_xanmod_latest =
        _:
        prev.linuxPackages_xanmod_latest.extend (
          self: _: {
            amneziawg =
              inputs.nixpkgs-amneziawg.legacyPackages.${final.system}.linuxPackages_xanmod_latest.amneziawg.override
                {
                  inherit (self) kernel;
                };
          }
        );
      amneziawg-go = _: inputs.nixpkgs-amneziawg.legacyPackages.${final.system}.amneziawg-go;
      amneziawg-tools = _: inputs.nixpkgs-amneziawg.legacyPackages.${final.system}.amneziawg-tools;
    };
}

Consider giving Nix/NixOS a try! <3