slock

fork of slock
git clone git://popovic.xyz/slock.git
Log | Files | Refs | README | LICENSE

commit 1c36a9a6a87c0184af41f1a657484ad8b65f35ab
parent 0f64691071071a827e13df1d82bc9ccb074117d2
Author: Milutin Popovic <milutin@popovic.xyz>
Date:   Sun,  4 Jan 2026 20:16:38 +0000

update flake

Diffstat:
Mconfig.mk | 39+++++++++++++++++----------------------
Mflake.nix | 13++++++++-----
2 files changed, 25 insertions(+), 27 deletions(-)

diff --git a/config.mk b/config.mk @@ -1,37 +1,32 @@ # slock version VERSION = 1.6 -# Customize below to fit your system - # paths PREFIX = $(out) -MANPREFIX = ${PREFIX}/share/man +MANPREFIX = $(PREFIX)/share/man -X11INC = /usr/X11R6/include -X11LIB = /usr/X11R6/lib +# Do NOT hardcode X11 paths on Nix +X11INC = +X11LIB = -# Xinerama, comment if you don't want it +# Xinerama XINERAMALIBS = -lXinerama XINERAMAFLAGS = -DXINERAMA -# freetype +# freetype / Xft FREETYPELIBS = -lXft -FREETYPEINC = /usr/include/freetype2 +FREETYPEINC = -# includes and libs -INCS = -I. -I/usr/include -I${X11INC} -I${FREETYPEINC} -LIBS = -L/usr/lib -lc -lcrypt -L${X11LIB} -lX11 -lImlib2 ${XINERAMALIBS} ${FREETYPELIBS} -lXext -lXrandr +# includes and libs (NO /usr paths) +INCS = -I. +LIBS = -lc -lcrypt \ + -lX11 -lImlib2 \ + $(XINERAMALIBS) $(FREETYPELIBS) \ + -lXext -lXrandr # flags -CPPFLAGS = -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE -DHAVE_SHADOW_H ${XINERAMAFLAGS} -CFLAGS = -std=c99 -pedantic -Wall -Ofast ${INCS} ${CPPFLAGS} -LDFLAGS = -s ${LIBS} -COMPATSRC = explicit_bzero.c +CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_DEFAULT_SOURCE -DHAVE_SHADOW_H $(XINERAMAFLAGS) +CFLAGS = -std=c99 -pedantic -Wall -Ofast $(INCS) $(CPPFLAGS) +LDFLAGS = -s $(LIBS) -# On OpenBSD and Darwin remove -lcrypt from LIBS -#LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXext -lXrandr -# On *BSD remove -DHAVE_SHADOW_H from CPPFLAGS -# On NetBSD add -D_NETBSD_SOURCE to CPPFLAGS -#CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE -D_NETBSD_SOURCE -# On OpenBSD set COMPATSRC to empty -#COMPATSRC = +COMPATSRC = explicit_bzero.c diff --git a/flake.nix b/flake.nix @@ -8,8 +8,6 @@ system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; in { - shell = pkgs.zsh; - devShells.${system}.default = pkgs.mkShell { # Compilers + build tools nativeBuildInputs = with pkgs; [ @@ -21,12 +19,17 @@ # Libraries + headers buildInputs = with pkgs; [ libx11 - libxinerama + libxext libxrandr + libxcrypt + libxinerama libxft imlib2 - libxcrypt - libxext + libxcb + xorg.libXrender + xorg.xorgproto + freetype + fontconfig ]; }; };