1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-19 11:35:12 +00:00
conky/flake.nix

101 lines
2.5 KiB
Nix
Raw Normal View History

2023-01-01 18:39:34 +00:00
{
description = "A Nix flake for Conky, including a dev shell";
2023-01-01 18:39:34 +00:00
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
2023-01-01 18:39:34 +00:00
pkgs = import nixpkgs {
inherit system;
overlays = [self.overlays.default];
2023-01-01 18:39:34 +00:00
};
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 {
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 = ./.;
2024-02-23 14:31:18 +00:00
cmakeFlags = [
2024-05-01 12:33:33 +00:00
"-DBUILD_CURL=ON"
"-DBUILD_LUA_CAIRO_XLIB=ON"
2024-02-23 15:10:20 +00:00
"-DBUILD_LUA_CAIRO=ON"
"-DBUILD_LUA_IMLIB2=ON"
"-DBUILD_LUA_RSVG=ON"
"-DBUILD_RSS=ON"
2024-02-23 14:31:18 +00:00
];
nativeBuildInputs = [
2024-05-01 12:33:33 +00:00
clang_18
cmake
git
2024-05-01 12:33:33 +00:00
gperf
llvmPackages_18.clang-unwrapped
ninja
pkg-config
];
buildInputs =
[
2024-02-23 14:31:18 +00:00
cairo
curl
freetype
gettext
imlib2
2024-02-23 14:31:18 +00:00
librsvg
libxml2
2024-05-01 12:33:33 +00:00
llvmPackages_18.libcxx
lua5_4
ncurses
xorg.libICE
xorg.libSM
xorg.libX11
2024-02-23 14:31:18 +00:00
xorg.libxcb
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXft
xorg.libXi
2024-02-23 14:31:18 +00:00
xorg.libXinerama
xorg.xcbutilerrors
]
++ lib.optional stdenv.isDarwin darwin.libobjc;
};
2023-01-01 18:39:34 +00:00
};
};
}