move env to a nix flake
This commit is contained in:
+5
-12
@@ -5,20 +5,13 @@ VERSION = 5.4-odweta
|
||||
PREFIX = /usr
|
||||
MANPREFIX = $(PREFIX)/share/man
|
||||
|
||||
X11INC = /usr/X11R6/include
|
||||
X11LIB = /usr/X11R6/lib
|
||||
|
||||
# Xinerama, comment if you don't want it
|
||||
XINERAMALIBS = -lXinerama
|
||||
XINERAMAFLAGS = -DXINERAMA
|
||||
|
||||
# freetype
|
||||
FREETYPELIBS = -lfontconfig -lXft
|
||||
FREETYPEINC = /usr/include/freetype2
|
||||
# compiler and linker flags
|
||||
X11INC = $(shell $(PKG_CONFIG) --cflags x11 xft xrandr xinerama fontconfig freetype2)
|
||||
X11LIB = $(shell $(PKG_CONFIG) --libs x11 xft xrandr xinerama fontconfig freetype2)
|
||||
|
||||
# includes and libs
|
||||
INCS = -I$(X11INC) -I$(FREETYPEINC)
|
||||
LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS)
|
||||
INCS = $(X11INC)
|
||||
LIBS = $(X11LIB)
|
||||
|
||||
# flags
|
||||
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS)
|
||||
|
||||
+5
-8
@@ -7,16 +7,13 @@ VERSION = 6.8-odweta
|
||||
PREFIX = /usr
|
||||
MANPREFIX = ${PREFIX}/share/man
|
||||
|
||||
X11INC = /usr/X11R6/include
|
||||
X11LIB = /usr/X11R6/lib
|
||||
|
||||
# freetype
|
||||
FREETYPELIBS = -lfontconfig -lXft
|
||||
FREETYPEINC = /usr/include/freetype2
|
||||
# compiler and linker flags
|
||||
X11INC = $(shell $(PKG_CONFIG) --cflags x11 xft xrandr xinerama fontconfig freetype2)
|
||||
X11LIB = $(shell $(PKG_CONFIG) --libs x11 xft xrandr xinerama fontconfig freetype2)
|
||||
|
||||
# includes and libs
|
||||
INCS = -I${X11INC} -I${FREETYPEINC}
|
||||
LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
|
||||
INCS = ${X11INC}
|
||||
LIBS = ${X11LIB}
|
||||
|
||||
# flags
|
||||
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
|
||||
|
||||
+10
-1
@@ -1,7 +1,16 @@
|
||||
PREFIX := /usr
|
||||
CC := cc
|
||||
CFLAGS := -pedantic -Wall -Wno-deprecated-declarations -Os
|
||||
LDFLAGS := -lX11
|
||||
LDFLAGS :=
|
||||
|
||||
PKG_CONFIG := pkg-config
|
||||
|
||||
# compiler and linker flags
|
||||
X11INC = $(shell $(PKG_CONFIG) --cflags x11 xft xrandr xinerama fontconfig freetype2)
|
||||
X11LIB = $(shell $(PKG_CONFIG) --libs x11 xft xrandr xinerama fontconfig freetype2)
|
||||
|
||||
CFLAGS += $(X11INC)
|
||||
LDFLAGS += $(X11LIB)
|
||||
|
||||
# FreeBSD (uncomment)
|
||||
#LDFLAGS += -L/usr/local/lib -I/usr/local/include
|
||||
|
||||
Generated
+27
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1790450978,
|
||||
"narHash": "sha256-/eLCD/X9kaWJqPR47+fDozEC87Hjmm3i8gJbYmDAD7g=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5e2305d577ca00acbba631b05cb1094d172b29f3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-26.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
|
||||
|
||||
outputs = { nixpkgs, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in {
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
gcc
|
||||
gnumake
|
||||
pkg-config
|
||||
libx11
|
||||
libxft
|
||||
libxext
|
||||
libxrender
|
||||
libxrandr
|
||||
libxinerama
|
||||
libxcrypt
|
||||
fontconfig
|
||||
freetype
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
+7
-3
@@ -1,9 +1,13 @@
|
||||
#1/usr/bin/env bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
install_module() {
|
||||
cd $1
|
||||
cd "$1"
|
||||
make clean
|
||||
make
|
||||
sudo make install clean
|
||||
cd -
|
||||
cd - >/dev/null
|
||||
}
|
||||
|
||||
install_module dmenu
|
||||
|
||||
+7
-4
@@ -7,12 +7,15 @@ VERSION = 1.6-odweta
|
||||
PREFIX = /usr
|
||||
MANPREFIX = ${PREFIX}/share/man
|
||||
|
||||
X11INC = /usr/X11R6/include
|
||||
X11LIB = /usr/X11R6/lib
|
||||
PKG_CONFIG := pkg-config
|
||||
|
||||
# compiler and linker flags
|
||||
X11INC = $(shell $(PKG_CONFIG) --cflags x11 xft xrandr xinerama fontconfig freetype2)
|
||||
X11LIB = $(shell $(PKG_CONFIG) --libs x11 xft xrandr xinerama fontconfig freetype2)
|
||||
|
||||
# includes and libs
|
||||
INCS = -I. -I/usr/include -I${X11INC}
|
||||
LIBS = -L/usr/lib -lc -lcrypt -L${X11LIB} -lX11 -lXext -lXrandr
|
||||
INCS = ${X11INC}
|
||||
LIBS = -lc -lcrypt ${X11LIB}
|
||||
|
||||
# flags
|
||||
CPPFLAGS = -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE -DHAVE_SHADOW_H
|
||||
|
||||
+8
-16
@@ -1,29 +1,21 @@
|
||||
# st version
|
||||
VERSION = 0.9.3-odweta
|
||||
|
||||
# Customize below to fit your system
|
||||
|
||||
# paths
|
||||
PREFIX = /usr
|
||||
MANPREFIX = $(PREFIX)/share/man
|
||||
|
||||
X11INC = /usr/X11R6/include
|
||||
X11LIB = /usr/X11R6/lib
|
||||
|
||||
CC = cc
|
||||
PKG_CONFIG = pkg-config
|
||||
|
||||
# includes and libs
|
||||
INCS = -I$(X11INC) \
|
||||
`$(PKG_CONFIG) --cflags fontconfig` \
|
||||
`$(PKG_CONFIG) --cflags freetype2`
|
||||
LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \
|
||||
`$(PKG_CONFIG) --libs fontconfig` \
|
||||
`$(PKG_CONFIG) --libs freetype2`
|
||||
# compiler and linker flags
|
||||
X11INC = $(shell $(PKG_CONFIG) --cflags x11 xft xrandr xinerama fontconfig freetype2)
|
||||
X11LIB = $(shell $(PKG_CONFIG) --libs x11 xft xrandr xinerama fontconfig freetype2)
|
||||
|
||||
INCS = $(X11INC)
|
||||
LIBS = $(X11LIB) -lm -lrt -lutil
|
||||
|
||||
# flags
|
||||
STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
|
||||
STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS)
|
||||
STLDFLAGS = $(LIBS) $(LDFLAGS)
|
||||
STLDFLAGS = $(LDFLAGS) $(LIBS)
|
||||
|
||||
# compiler and linker
|
||||
CC = cc
|
||||
|
||||
Reference in New Issue
Block a user