Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions pkgs/applications/misc/dzen2/builder.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
source $stdenv/setup

die() { echo $@ >&2 ; exit 1; }

tar xvfz $src

cd dzen2-* || die

patchPhase || die

cat config.mk | \
sed "s@X11INC = SETME@X11INC = $libX11/include@g" | \
sed "s@X11LIB = SETME@X11LIB = $libX11/lib@g" | \
sed "s@XINERAMAINC = SETME@XINERAMAINC = $libXinerama/include@g" | \
sed "s@XINERAMALIB = SETME@XINERAMALIB = $libXinerama/lib@g" | \
sed "s@XPMINC = SETME@XPMINC = $libXpm/include@g" | \
sed "s@XPMLIB = SETME@XPMLIB = $libXpm/lib@g" | \
sed "s@PREFIX = SETME@PREFIX = $out@g" | \
cat > config.mk.new || die

mv config.mk.new config.mk || die

make || die

make install || die

cd gadgets || die

cat config.mk | \
sed "s@PREFIX = /usr/local@PREFIX = $out@g" | \
cat > config.mk.new || die
mv config.mk.new config.mk || die

make || die

make install || die

22 changes: 22 additions & 0 deletions pkgs/applications/misc/dzen2/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{stdenv, fetchurl, libX11, libXinerama, libXpm}:

stdenv.mkDerivation rec {
name = "dzen2-0.8.5";

src = fetchurl {
url = "https://sites.google.com/site/gotmor/dzen2-0.8.5.tar.gz";
sha256 = "5e4ce96e8ed22a4a0ad6cfafacdde0532d13d049d77744214b196c4b2bcddff9";
};

buildInputs = [ libX11 libXinerama libXpm ];

builder = ./builder.sh;

patches = [ ./dzenconf.patch ];

meta = {
description = "Dzen is a general purpose messaging, notification and menuing program for X11";
homepage = https://sites.google.com/site/gotmor/dzen;
license = "MIT";
};
}
49 changes: 49 additions & 0 deletions pkgs/applications/misc/dzen2/dzenconf.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
--- a/config.mk 2012-01-12 23:04:41.000000000 +0400
+++ b/config.mk 2012-01-12 23:07:58.000000000 +0400
@@ -1,15 +1,20 @@
+X11INC = SETME
+X11LIB = SETME
+XINERAMAINC = SETME
+XINERAMALIB = SETME
+XPMINC = SETME
+XPMLIB = SETME
+PREFIX = SETME
+
# dzen version
VERSION = 0.8.5

# Customize below to fit your system

# paths
-PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man

-X11INC = /usr/X11R6/include
-X11LIB = /usr/X11R6/lib
-INCS = -I. -I/usr/include -I${X11INC}
+INCS = -I. -I${X11INC} -I${XINERAMAINC} -I${XPMINC}

# Configure the features you want to be supported
# Only one of the following options has to be uncommented,
@@ -19,8 +24,8 @@
# Comment : Add # to the beginning of the respective lines

# Option 1: No Xinerama no XPM
-LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
-CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\"
+#LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
+#CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\"

# Option 2: No Xinerama with XPM
#LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXpm
@@ -31,8 +36,8 @@
#CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -DDZEN_XINERAMA

# Option 4: With Xinerama and XPM
-#LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXinerama -lXpm
-#CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -DDZEN_XINERAMA -DDZEN_XPM
+LIBS = -lc -L${X11LIB} -L${XINERAMALIB} -L${XPMLIB} -lX11 -lXinerama -lXpm
+CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -DDZEN_XINERAMA -DDZEN_XPM

# END of feature configuration

2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7553,6 +7553,8 @@ let
dmenu = callPackage ../applications/misc/dmenu {
enableXft = config.dmenu.enableXft or false;
};

dzen2 = callPackage ../applications/misc/dzen2 { };

dmtx = builderDefsPackage (import ../tools/graphics/dmtx) {
inherit libpng libtiff libjpeg imagemagick librsvg
Expand Down