File: flake.nix

package info (click to toggle)
conky 1.22.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,376 kB
  • sloc: cpp: 64,271; ansic: 18,382; python: 813; xml: 324; sh: 248; makefile: 143; javascript: 139
file content (106 lines) | stat: -rw-r--r-- 2,734 bytes parent folder | download | duplicates (2)
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
{
  description = "A Nix flake for Conky, including a dev shell";
  inputs = {
    nixpkgs = {
      url = "github:nixos/nixpkgs/nixos-unstable";
    };
    flake-utils = {
      url = "github:numtide/flake-utils";
    };
  };

  outputs = {
    self,
    nixpkgs,
    flake-utils,
    ...
  }:
    flake-utils.lib.eachDefaultSystem
    (
      system: let
        pkgs = import nixpkgs {
          inherit system;
          overlays = [self.overlays.default];
        };
      in
        with pkgs; rec
        {
          packages = flake-utils.lib.flattenTree {
            conky = conky;
            default = conky;
          };

          apps.conky = flake-utils.lib.mkApp {
            drv = packages.conky;
          };
          apps.default = apps.conky;
          devShells.default =
            mkShell.override {
              stdenv = llvmPackages_18.libcxxStdenv;
            } rec {
              buildInputs =
                packages.conky.buildInputs
                ++ packages.conky.nativeBuildInputs
                ++ [
                  alejandra # for beautifying flake
                  lefthook # for git hooks
                  nodejs # for web/ stuff
                  # for docs
                  (python3.withPackages (ps: with ps; [jinja2]))
                ];
            };
        }
    )
    // {
      overlays.default = final: prev: {
        conky = with final;
          stdenv.mkDerivation rec {
            name = "conky";
            src = ./.;
            cmakeFlags = [
              "-DBUILD_CURL=ON"
              "-DBUILD_LUA_CAIRO_XLIB=ON"
              "-DBUILD_LUA_CAIRO=ON"
              "-DBUILD_LUA_IMLIB2=ON"
              "-DBUILD_LUA_RSVG=ON"
              "-DBUILD_RSS=ON"
              "-DREPRODUCIBLE_BUILD=ON"
            ];
            nativeBuildInputs = [
              clang_18
              cmake
              git
              gperf
              llvmPackages_18.clang-unwrapped
              ninja
              pkg-config
            ];
            buildInputs =
              [
                cairo
                curl
                freetype
                gettext
                imlib2
                librsvg
                libxml2
                llvmPackages_18.libcxx
                lua5_4
                ncurses
                xorg.libICE
                xorg.libSM
                xorg.libX11
                xorg.libxcb
                xorg.libXdamage
                xorg.libXext
                xorg.libXfixes
                xorg.libXft
                xorg.libXi
                xorg.libXinerama
                xorg.xcbutilerrors
              ]
              ++ lib.optional stdenv.isDarwin darwin.libobjc;
          };
      };
    };
}