Merge pull request #51205 from matthewbauer/more-setup-hooks

Add premake & imake setup hook
This commit is contained in:
Matthew Bauer 2018-11-29 19:36:25 -06:00 committed by GitHub
commit 76c7a8bac0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 226 additions and 218 deletions

View File

@ -1,7 +1,13 @@
{ stdenv, fetchFromGitHub, alsaLib, fftwSinglePrec, freetype, libjack2 { stdenv, fetchFromGitHub, alsaLib, fftwSinglePrec, freetype, libjack2
, pkgconfig, premake3, xorg, ladspa-sdk }: , pkgconfig, ladspa-sdk, premake3
, libX11, libXcomposite, libXcursor, libXext, libXinerama, libXrender
}:
stdenv.mkDerivation rec { let
premakeos = if stdenv.hostPlatform.isDarwin then "osx"
else if stdenv.hostPlatform.isWindows then "mingw"
else "linux";
in stdenv.mkDerivation rec {
name = "distrho-ports-${version}"; name = "distrho-ports-${version}";
version = "2018-04-16"; version = "2018-04-16";
@ -12,27 +18,26 @@ stdenv.mkDerivation rec {
sha256 = "0l4zwl4mli8jzch32a1fh7c88r9q17xnkxsdw17ds5hadnxlk12v"; sha256 = "0l4zwl4mli8jzch32a1fh7c88r9q17xnkxsdw17ds5hadnxlk12v";
}; };
configurePhase = ''
runHook preConfigure
sh ./scripts/premake-update.sh ${premakeos}
runHook postConfigure
'';
patchPhase = '' patchPhase = ''
sed -e "s#@./scripts#sh scripts#" -i Makefile sed -e "s#@./scripts#sh scripts#" -i Makefile
''; '';
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig premake3 ];
buildInputs = [ buildInputs = [
alsaLib fftwSinglePrec freetype libjack2 premake3 alsaLib fftwSinglePrec freetype libjack2
xorg.libX11 xorg.libXcomposite xorg.libXcursor xorg.libXext libX11 libXcomposite libXcursor libXext
xorg.libXinerama xorg.libXrender ladspa-sdk libXinerama libXrender ladspa-sdk
]; ];
buildPhase = '' makeFlags = "PREFIX=$(out)";
sh ./scripts/premake-update.sh linux
make lv2
'';
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/lib/lv2
cp -a bin/lv2/* $out/lib/lv2/
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://distrho.sourceforge.net; homepage = http://distrho.sourceforge.net;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, xorg, xlibsWrapper }: { stdenv, fetchurl, imake, gccmakedep, xlibsWrapper }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.2.sakura.5"; version = "1.2.sakura.5";
@ -8,14 +8,11 @@ stdenv.mkDerivation rec {
url = "http://www.daidouji.com/oneko/distfiles/oneko-${version}.tar.gz"; url = "http://www.daidouji.com/oneko/distfiles/oneko-${version}.tar.gz";
sha256 = "2c2e05f1241e9b76f54475b5577cd4fb6670de058218d04a741a04ebd4a2b22f"; sha256 = "2c2e05f1241e9b76f54475b5577cd4fb6670de058218d04a741a04ebd4a2b22f";
}; };
buildInputs = [ xorg.imake xorg.gccmakedep xlibsWrapper ]; nativeBuildInputs = [ imake gccmakedep ];
buildInputs = [ xlibsWrapper ];
configurePhase = "xmkmf"; makeFlags = [ "BINDIR=$(out)/bin" "MANPATH=$(out)/share/man" ];
installTargets = "install install.man";
installPhase = ''
make install BINDIR=$out/bin
make install.man MANPATH=$out/share/man
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Creates a cute cat chasing around your mouse cursor"; description = "Creates a cute cat chasing around your mouse cursor";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, gccmakedep, xorg }: { stdenv, fetchurl, gccmakedep, xorg, imake, libXt, libXaw, libXpm, libXext }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "xcruiser-0.30"; name = "xcruiser-0.30";
@ -8,13 +8,13 @@ stdenv.mkDerivation {
sha256 = "1r8whva38xizqdh7jmn6wcmfmsndc67pkw22wzfzr6rq0vf6hywi"; sha256 = "1r8whva38xizqdh7jmn6wcmfmsndc67pkw22wzfzr6rq0vf6hywi";
}; };
buildInputs = with xorg; [ gccmakedep imake libXt libXaw libXpm libXext ]; nativeBuildInputs = [ gccmakedep imake ];
buildInputs = [ libXt libXaw libXpm libXext ];
configurePhase = "xmkmf -a"; makeFlags = [
"BINDIR=$(out)/bin"
preBuild = '' "XAPPLOADDIR=$(out)/etc/X11/app-defaults"
makeFlagsArray=( BINDIR=$out/bin XAPPLOADDIR=$out/etc/X11/app-defaults) ];
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Filesystem visualization utility"; description = "Filesystem visualization utility";

View File

@ -1,19 +0,0 @@
{stdenv, fetchurl, libX11, libXi, imake, xauth, libXau}:
stdenv.mkDerivation {
name = "xmove-2.0b2";
src = fetchurl {
url = mirror://debian/pool/main/x/xmove/xmove_2.0beta2.orig.tar.gz;
sha256 = "0q310k3bi39vdk0kqqvsahnb1k6lx9hlx80iyxnkq59l6jxnhyhf";
};
buildPhase = "cd xmove; sed -e 's/.*No address for our host.*/{hp = gethostbyname(\"localhost\");};/' -i main.c; cp ../man/man1/xmove.1 xmove.man ; xmkmf; make; cd .. ; cd xmovectrl ; cp ../man/man1/xmovectrl.1 xmovectrl.man; xmkmf; make ; cd ..";
installPhase = "cd xmove; make install install.man MANDIR=\${out}/man/man1 BINDIR=\${out}/bin; cd .. ; cd xmovectrl ; make install install.man MANDIR=\${out}/man/man1 BINDIR=\${out}/bin; cd ..";
buildInputs = [libX11 libXi imake xauth libXau];
meta = {
platforms = stdenv.lib.platforms.linux;
license = stdenv.lib.licenses.mit;
};
}

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, libX11, libXt, libXext, libXpm, imake { stdenv, fetchurl, libX11, libXt, libXext, libXpm, imake, gccmakedep
, svgSupport ? true, librsvg, glib, gdk_pixbuf, pkgconfig , svgSupport ? false, librsvg, glib, gdk_pixbuf, pkgconfig
}: }:
assert svgSupport -> assert svgSupport ->
@ -13,20 +13,21 @@ stdenv.mkDerivation rec {
sha256 = "0hl1i38z9xnbgfjkaz04vv1n8xbgfg88g5z8fyzyb2hxv2z37anf"; sha256 = "0hl1i38z9xnbgfjkaz04vv1n8xbgfg88g5z8fyzyb2hxv2z37anf";
}; };
nativeBuildInputs = [ imake gccmakedep ];
buildInputs = [ buildInputs = [
imake
libX11 libXt libXext libXpm libX11 libXt libXext libXpm
] ++ stdenv.lib.optionals svgSupport [ librsvg glib gdk_pixbuf pkgconfig ]; ] ++ stdenv.lib.optionals svgSupport [ librsvg glib gdk_pixbuf pkgconfig ];
outputs = [ "out" "man" ]; outputs = [ "out" "man" ];
configurePhase = '' imakeFlags = stdenv.lib.optionalString svgSupport "-DWITH_SVG_SUPPORT";
xmkmf ${stdenv.lib.optionalString svgSupport "-DWITH_SVG_SUPPORT"}
'';
preBuild = '' makeFlags = [
makeFlagsArray=( BINDIR=$out/bin PIXMAPDIR=$out/share/xxkb XAPPLOADDIR=$out/etc/X11/app-defaults MANDIR=$man/share/man ) "BINDIR=${placeholder "out"}/bin"
''; "PIXMAPDIR=${placeholder "out"}/share/xxkb"
"XAPPLOADDIR=${placeholder "out"}/etc/X11/app-defaults"
"MANDIR=${placeholder "man"}/share/man"
];
installTargets = "install install.man"; installTargets = "install install.man";

View File

@ -12,7 +12,9 @@ stdenv.mkDerivation rec {
buildInputs = [ imake zlib jdk libX11 libXt libXmu libXaw libXext libXpm openjpeg openssl ]; buildInputs = [ imake zlib jdk libX11 libXt libXmu libXaw libXext libXpm openjpeg openssl ];
configurePhase = "makeFlags=PREFIX=$out"; dontUseImakeConfigure = true;
makeFlags = "PREFIX=$(out)";
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];

View File

@ -1,21 +1,20 @@
{ stdenv, fetchurl, xorg }: { stdenv, fetchurl, imake, gccmakedep, libXt, libXext }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "xearth-${version}"; name = "xearth-${version}";
version = "1.1"; version = "1.1";
src = fetchurl { src = fetchurl {
url = "http://xearth.org/${name}.tar.gz"; url = "http://xearth.org/${name}.tar.gz";
sha256 = "bcb1407cc35b3f6dd3606b2c6072273b6a912cbd9ed1ae22fb2d26694541309c"; sha256 = "bcb1407cc35b3f6dd3606b2c6072273b6a912cbd9ed1ae22fb2d26694541309c";
}; };
buildInputs = with xorg; [ imake libXt libXext ]; nativeBuildInputs = [ imake gccmakedep ];
buildInputs = [ libXt libXext ];
dontAddPrefix = true;
configureScript="xmkmf";
installFlags=[ "DESTDIR=$(out)/" "BINDIR=bin" "MANDIR=man/man1"]; installFlags=[ "DESTDIR=$(out)/" "BINDIR=bin" "MANDIR=man/man1"];
installTargets="install install.man"; installTargets="install install.man";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "sets the X root window to an image of the Earth"; description = "sets the X root window to an image of the Earth";
homepage = "http://xplanet.org"; homepage = "http://xplanet.org";

View File

@ -12,7 +12,9 @@ stdenv.mkDerivation rec {
sha256 = "1pqywkidfpdbj18i03h97f4cimld4fb3mqfy8jjsxs12kihm18fs"; sha256 = "1pqywkidfpdbj18i03h97f4cimld4fb3mqfy8jjsxs12kihm18fs";
}; };
buildInputs = [ tcl tk libX11 which yacc flex imake xproto gccmakedep ]; nativeBuildInputs = [ which yacc flex imake gccmakedep ];
buildInputs = [ tcl tk libX11 xproto ];
dontUseImakeConfigure = true;
patchPhase = '' patchPhase = ''
sed -i config.h \ sed -i config.h \

View File

@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
sha256 = "0463bff5eea0f3d93fa071f79c18d0993878fd4f2e18ae6cf22c1639d11457ed"; sha256 = "0463bff5eea0f3d93fa071f79c18d0993878fd4f2e18ae6cf22c1639d11457ed";
}; };
dontUseImakeConfigure = true;
buildInputs = [ buildInputs = [
bzip2 gfortran libX11 libXmu libXt libXt libjpeg libpng libtiff ncurses bzip2 gfortran libX11 libXmu libXt libXt libjpeg libpng libtiff ncurses
pango pcre perl readline texLive xz zlib less texinfo graphviz icu pango pcre perl readline texLive xz zlib less texinfo graphviz icu

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, imake, libX11, libXext, libXmu}: { stdenv, fetchurl, imake, gccmakedep, libX11, libXext, libXmu }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "larswm-7.5.3"; name = "larswm-7.5.3";
@ -8,13 +8,11 @@ stdenv.mkDerivation {
sha256 = "1xmlx9g1nhklxjrg0wvsya01s4k5b9fphnpl9zdwp29mm484ni3v"; sha256 = "1xmlx9g1nhklxjrg0wvsya01s4k5b9fphnpl9zdwp29mm484ni3v";
}; };
buildInputs = [ imake libX11 libXext libXmu ]; nativeBuildInputs = [ imake gccmakedep ];
buildInputs = [ libX11 libXext libXmu ];
configurePhase = '' makeFlags = [ "BINDIR=$(out)/bin" "MANPATH=$(out)/share/man" ];
xmkmf installTargets = "install install.man";
makeFlags="BINDIR=$out/bin MANPATH=$out/share/man"
installTargets="install install.man"
'';
meta = { meta = {
homepage = http://www.fnurt.net/larswm; homepage = http://www.fnurt.net/larswm;

View File

@ -8,6 +8,7 @@ stdenv.mkDerivation {
url = https://www.x.org/releases/individual/lib/libXaw3d-1.6.3.tar.bz2; url = https://www.x.org/releases/individual/lib/libXaw3d-1.6.3.tar.bz2;
sha256 = "0i653s8g25cc0mimkwid9366bqkbyhdyjhckx7bw77j20hzrkfid"; sha256 = "0i653s8g25cc0mimkwid9366bqkbyhdyjhckx7bw77j20hzrkfid";
}; };
dontUseImakeConfigure = true;
nativeBuildInputs = [ pkgconfig bison flex imake gccmakedep ]; nativeBuildInputs = [ pkgconfig bison flex imake gccmakedep ];
buildInputs = [ libXpm libXp ]; buildInputs = [ libXpm libXp ];
propagatedBuildInputs = [ xlibsWrapper libXmu ]; propagatedBuildInputs = [ xlibsWrapper libXmu ];

View File

@ -23,21 +23,21 @@ stdenv.mkDerivation rec {
url = https://github.com/garrynewman/bootil/pull/22.patch; url = https://github.com/garrynewman/bootil/pull/22.patch;
name = "github-pull-request-22.patch"; name = "github-pull-request-22.patch";
sha256 = "1qf8wkv00pb9w1aa0dl89c8gm4rmzkxfl7hidj4gz0wpy7a24qa2"; sha256 = "1qf8wkv00pb9w1aa0dl89c8gm4rmzkxfl7hidj4gz0wpy7a24qa2";
})]; }) ];
platform = # Avoid guessing where files end up. Just use current directory.
if stdenv.isLinux then "linux" postPatch = ''
else if stdenv.isDarwin then "macosx" substituteInPlace projects/premake4.lua \
else throw "unrecognized system ${stdenv.hostPlatform.system}"; --replace 'location ( os.get() .. "/" .. _ACTION )' 'location ( ".." )'
substituteInPlace projects/bootil.lua \
--replace 'targetdir ( "../lib/" .. os.get() .. "/" .. _ACTION )' 'targetdir ( ".." )'
'';
buildInputs = [ premake4 ]; nativeBuildInputs = [ premake4 ];
premakefile = "projects/premake4.lua";
configurePhase = "premake4 --file=projects/premake4.lua gmake";
makeFlags = "-C projects/${platform}/gmake";
installPhase = '' installPhase = ''
mkdir -p $out/lib install -D libbootil_static.a $out/lib/libbootil_static.a
cp lib/${platform}/gmake/libbootil_static.a $out/lib/ cp -r include $out
cp -r include $out/
''; '';
} }

View File

@ -15,9 +15,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ premake5 doxygen ]; nativeBuildInputs = [ premake5 doxygen ];
propagatedBuildInputs = [ libsodium mbedtls ]; propagatedBuildInputs = [ libsodium mbedtls ];
buildPhase = '' postBuild = ''
premake5 gmake
make all
premake5 docs premake5 docs
''; '';
@ -28,6 +26,8 @@ stdenv.mkDerivation rec {
cp -r docs/html $out/share/doc/yojimbo cp -r docs/html $out/share/doc/yojimbo
''; '';
doCheck = true;
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A network library for client/server games with dedicated servers"; description = "A network library for client/server games with dedicated servers";
longDescription = '' longDescription = ''

View File

@ -18,6 +18,9 @@ stdenv.mkDerivation {
install -Dm755 bin/premake $out/bin/premake install -Dm755 bin/premake $out/bin/premake
''; '';
premake_cmd = "premake3";
setupHook = ./setup-hook.sh;
meta = { meta = {
homepage = http://industriousone.com/premake; homepage = http://industriousone.com/premake;
description = "A simple build configuration and project generation tool using lua"; description = "A simple build configuration and project generation tool using lua";

View File

@ -31,6 +31,9 @@ stdenv.mkDerivation rec {
install -Dm755 bin/release/premake5 $out/bin/premake5 install -Dm755 bin/release/premake5 $out/bin/premake5
''; '';
premake_cmd = "premake5";
setupHook = ./setup-hook.sh;
meta = { meta = {
homepage = https://premake.github.io; homepage = https://premake.github.io;
description = "A simple build configuration and project generation tool using lua"; description = "A simple build configuration and project generation tool using lua";

View File

@ -12,7 +12,7 @@ stdenv.mkDerivation {
sha256 = "1017rd0wsjfyq2jvpjjhpszaa7kmig6q1nimw76qx3cjz2868lrn"; sha256 = "1017rd0wsjfyq2jvpjjhpszaa7kmig6q1nimw76qx3cjz2868lrn";
}; };
buildInputs = [ unzip ]; nativeBuildInputs = [ unzip ];
buildPhase = '' buildPhase = ''
make -C build/gmake.unix/ make -C build/gmake.unix/
@ -22,11 +22,14 @@ stdenv.mkDerivation {
install -Dm755 bin/release/premake4 $out/bin/premake4 install -Dm755 bin/release/premake4 $out/bin/premake4
''; '';
premake_cmd = "premake4";
setupHook = ./setup-hook.sh;
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://industriousone.com/premake; homepage = http://industriousone.com/premake;
description = "A simple build configuration and project generation tool using lua"; description = "A simple build configuration and project generation tool using lua";
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.bsd3;
platforms = platforms.linux; platforms = platforms.unix;
maintainers = [ maintainers.bjornfor ]; maintainers = [ maintainers.bjornfor ];
}; };
} }

View File

@ -0,0 +1,19 @@
premakeConfigurePhase() {
runHook preConfigure
local flagsArray=(
${premakefile:+--file=$premakefile}
$premakeFlags ${premakeFlagsArray[@]}
${premakeBackend:-gmake}
)
echoCmd 'configure flags' "${flagsArray[@]}"
@premake_cmd@ "${flagsArray[@]}"
runHook postConfigure
}
if [ -z "$configurePhase" ]; then
configurePhase=premakeConfigurePhase
fi

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
else if stdenv.isDarwin then "gmad_osx" else if stdenv.isDarwin then "gmad_osx"
else "gmad"; else "gmad";
configurePhase = "premake4 --bootil_lib=${bootil}/lib --bootil_inc=${bootil}/include gmake"; premakeFlags = "--bootil_lib=${bootil}/lib --bootil_inc=${bootil}/include";
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin

View File

@ -25,9 +25,10 @@ in stdenv.mkDerivation rec {
sha256 = "0mc5dgh2x9nbili7gy6srjhb23ckalf08wqq2amyjr5rq392jvd7"; sha256 = "0mc5dgh2x9nbili7gy6srjhb23ckalf08wqq2amyjr5rq392jvd7";
}; };
nativeBuildInputs = [ premake4 makeWrapper unzip ]; nativeBuildInputs = [ makeWrapper unzip premake4 ];
# tome4 vendors quite a few libraries so someone might want to look into avoiding that... # tome4 vendors quite a few libraries so someone might want to look
# into avoiding that...
buildInputs = [ buildInputs = [
libGLU openal libpng libvorbis SDL2 SDL2_ttf SDL2_image libGLU openal libpng libvorbis SDL2 SDL2_ttf SDL2_image
]; ];
@ -36,20 +37,11 @@ in stdenv.mkDerivation rec {
enableParallelBuilding = false; enableParallelBuilding = false;
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = [
"-I${SDL2.dev}/include/SDL2"
"-I${SDL2_image}/include/SDL2" "-I${SDL2_image}/include/SDL2"
"-I${SDL2_ttf}/include/SDL2" "-I${SDL2_ttf}/include/SDL2"
]; ];
postPatch = ''
substituteInPlace premake4.lua \
--replace "/opt/SDL-2.0/include/SDL2" "${SDL2.dev}/include/SDL2" \
--replace "/usr/include/GL" "/run/opengl-driver/include"
'';
preConfigure = ''
premake4 gmake
'';
makeFlags = [ "config=release" ]; makeFlags = [ "config=release" ];
# The wrapper needs to cd into the correct directory as tome4's detection of # The wrapper needs to cd into the correct directory as tome4's detection of

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, libXt, libXpm, libXext, imake }: { stdenv, fetchurl, libXt, libXpm, libXext, imake, gccmakedep }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -10,25 +10,17 @@ stdenv.mkDerivation rec {
sha256 = "06jnbp88wc9i9dbmy7kggplw4hzlx2bhghxijmlhkjlizgqwimyh"; sha256 = "06jnbp88wc9i9dbmy7kggplw4hzlx2bhghxijmlhkjlizgqwimyh";
}; };
nativeBuildInputs = [ imake gccmakedep ];
buildInputs = [ buildInputs = [
libXt libXpm libXext imake libXt libXpm libXext
]; ];
buildPhase = '' makeFlags = [ "BINDIR=$(out)/bin" "MANPATH=$(out)/share/man" ];
xmkmf
make
'';
installPhase = ''
mkdir -p $out/bin $out/share/man/man1
cp xsnow $out/bin/
cp xsnow.1 $out/share/man/man1/
'';
meta = { meta = {
description = "An X-windows application that will let it snow on the root, in between and on windows"; description = "An X-windows application that will let it snow on the root, in between and on windows";
homepage = http://janswaal.home.xs4all.nl/Xsnow/; homepage = http://janswaal.home.xs4all.nl/Xsnow/;
license = stdenv.lib.licenses.unfree; license = stdenv.lib.licenses.unfree;
maintainers = [ stdenv.lib.maintainers.robberer ]; maintainers = [ stdenv.lib.maintainers.robberer ];
}; };
} }

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, xlibsWrapper, imake, libXScrnSaver, scrnsaverproto }: { stdenv, fetchurl, xlibsWrapper
, imake, gccmakedep, libXScrnSaver, scrnsaverproto }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "xautolock-2.2"; name = "xautolock-2.2";
@ -14,10 +15,13 @@ stdenv.mkDerivation rec {
}) })
]; ];
NIX_CFLAGS_COMPILE = "-DSYSV"; NIX_CFLAGS_COMPILE = "-DSYSV";
makeFlags="BINDIR=\${out}/bin MANPATH=\${out}/man"; makeFlags = [
preBuild = "xmkmf"; "BINDIR=$(out)/bin"
"MANPATH=$(out)/share/man"
];
installTargets = "install install.man"; installTargets = "install install.man";
buildInputs = [xlibsWrapper imake libXScrnSaver scrnsaverproto]; nativeBuildInputs = [ imake gccmakedep ];
buildInputs = [ xlibsWrapper libXScrnSaver scrnsaverproto ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A program that launches a given program when your X session has been idle for a given time."; description = "A program that launches a given program when your X session has been idle for a given time.";
homepage = http://www.ibiblio.org/pub/linux/X11/screensavers; homepage = http://www.ibiblio.org/pub/linux/X11/screensavers;

View File

@ -16,12 +16,9 @@ in stdenv.mkDerivation {
buildInputs = [ xproto libXau libXt libXext libXaw libXpm ]; buildInputs = [ xproto libXau libXt libXext libXaw libXpm ];
buildPhase = '' buildFlags = [ "WORLDOPTS=" "World" ];
xmkmf
make WORLDOPTS="" World
'';
installFlags = "LDLIBS=-lfl DESTDIR=\${out}"; installFlags = [ "LDLIBS=-lfl" "DESTDIR=${placeholder "out"}" ];
postInstall = '' postInstall = ''
mv $out/${xorgcffiles}/* $out mv $out/${xorgcffiles}/* $out

View File

@ -1 +0,0 @@
export IMAKECPP="@tradcpp@/bin/tradcpp"

View File

@ -0,0 +1,19 @@
export IMAKECPP="@tradcpp@/bin/tradcpp"
imakeConfigurePhase() {
runHook preConfigure
echoCmd 'configuring with imake'
if [ -z "${imakefile:-}" -a ! -e Imakefile ]; then
echo "no Imakefile, doing nothing"
else
xmkmf -a
fi
runHook postConfigure
}
if [ -z "$dontUseImakeConfigure" -a -z "$configurePhase" ]; then
configurePhase=imakeConfigurePhase
fi

View File

@ -63,12 +63,12 @@ self: super:
inherit (self) xorgcffiles; inherit (self) xorgcffiles;
x11BuildHook = ./imake.sh; x11BuildHook = ./imake.sh;
patches = [./imake.patch ./imake-cc-wrapper-uberhack.patch]; patches = [./imake.patch ./imake-cc-wrapper-uberhack.patch];
setupHook = if stdenv.isDarwin then ./darwin-imake-setup-hook.sh else null; setupHook = ./imake-setup-hook.sh;
CFLAGS = [ "-DIMAKE_COMPILETIME_CPP=\\\"${if stdenv.isDarwin CFLAGS = [ ''-DIMAKE_COMPILETIME_CPP='"${if stdenv.isDarwin
then "${tradcpp}/bin/cpp" then "${tradcpp}/bin/cpp"
else "gcc"}\\\"" else "gcc"}"' ''
]; ];
tradcpp = if stdenv.isDarwin then tradcpp else null; inherit tradcpp;
}); });
mkfontdir = super.mkfontdir.overrideAttrs (attrs: { mkfontdir = super.mkfontdir.overrideAttrs (attrs: {

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, imake, libX11, libXtst, libXext}: { stdenv, fetchurl, imake, libX11, libXtst, libXext, gccmakedep }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "x2x-1.27"; name = "x2x-1.27";
@ -8,20 +8,16 @@ stdenv.mkDerivation {
sha256 = "0dha0kn1lbc4as0wixsvk6bn4innv49z9a0sm5wlx4q1v0vzqzyj"; sha256 = "0dha0kn1lbc4as0wixsvk6bn4innv49z9a0sm5wlx4q1v0vzqzyj";
}; };
buildInputs = [ imake libX11 libXtst libXext ]; nativeBuildInputs = [ imake gccmakedep ];
buildInputs = [ libX11 libXtst libXext ];
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
configurePhase = '' buildFlags = [ "x2x" ];
xmkmf
makeFlags="BINDIR=$out/bin x2x"
'';
installPhase = '' installPhase = ''
mkdir -p $out/bin install -D x2x $out/bin/x2x
mkdir -p $out/man/man1 install -D x2x.1 $out/man/man1/x2x.1
cp x2x $out/bin/
cp x2x.1 $out/man/man1/
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, xorg }: { stdenv, fetchurl, imake, gccmakedep
, libX11, libXaw, libXext, libXmu, libXpm, libXxf86vm }:
stdenv.mkDerivation { stdenv.mkDerivation {
@ -8,22 +9,11 @@ stdenv.mkDerivation {
sha256 = "2564dbd393544657cdabe4cbf535d9cfb9abe8edddb1b8cdb1ed4d12f358626e"; sha256 = "2564dbd393544657cdabe4cbf535d9cfb9abe8edddb1b8cdb1ed4d12f358626e";
}; };
buildInputs = [ nativeBuildInputs = [ imake gccmakedep ];
xorg.imake buildInputs = [ libX11 libXaw libXext libXmu libXpm libXxf86vm ];
xorg.libX11
xorg.libXaw
xorg.libXext
xorg.libXmu
xorg.libXpm
xorg.libXxf86vm
];
configurePhase = "xmkmf"; makeFlags = [ "BINDIR=$(out)/bin" "MANPATH=$(out)/share/man" ];
installTargets = "install install.man";
installPhase = ''
make install BINDIR=$out/bin
make install.man MANPATH=$out/share/man
'';
meta = { meta = {
description = "X11 brigthness and gamma software control"; description = "X11 brigthness and gamma software control";

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, imake, libXt, libXaw, libXtst, libXi, libXpm, xextproto, gccmakedep, Xaw3d }: { stdenv, fetchurl, imake, libXt, libXaw, libXtst
, libXi, libXpm, xextproto, gccmakedep, Xaw3d }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "xvkbd-${version}"; name = "xvkbd-${version}";
@ -8,12 +9,14 @@ stdenv.mkDerivation rec {
sha256 = "17csj6x5zm3g67izfwhagkal1rbqzpw09lqmmlyrjy3vzgfkf75q"; sha256 = "17csj6x5zm3g67izfwhagkal1rbqzpw09lqmmlyrjy3vzgfkf75q";
}; };
buildInputs = [ imake libXt libXaw libXtst xextproto libXi Xaw3d libXpm gccmakedep ]; nativeBuildInputs = [ imake gccmakedep ];
buildInputs = [ libXt libXaw libXtst xextproto libXi Xaw3d libXpm ];
installTargets = [ "install" "install.man" ]; installTargets = [ "install" "install.man" ];
preBuild = '' makeFlags = [
makeFlagsArray=( BINDIR=$out/bin XAPPLOADDIR=$out/etc/X11/app-defaults MANPATH=$out/man ) "BINDIR=$(out)/bin"
''; "XAPPLOADDIR=$(out)/etc/X11/app-defaults"
configurePhase = '' xmkmf -a ''; "MANPATH=$(out)/man"
];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Virtual keyboard for X window system"; description = "Virtual keyboard for X window system";

View File

@ -1,4 +1,5 @@
{stdenv, fetchurl, libX11, imake, libXext, libXt}: { stdenv, fetchurl, libX11, libXext, libXt, imake, gccmakedep}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "${pname}-${version}.${patchlevel}"; name = "${pname}-${version}.${patchlevel}";
pname = "xzoom"; pname = "xzoom";
@ -16,12 +17,16 @@ stdenv.mkDerivation rec {
sha256 = "0zhc06whbvaz987bzzzi2bz6h9jp6rv812qs7b71drivvd820qbh"; sha256 = "0zhc06whbvaz987bzzzi2bz6h9jp6rv812qs7b71drivvd820qbh";
}) })
]; ];
buildInputs = [libX11 imake libXext libXt];
configurePhase = '' nativeBuildInputs = [ imake gccmakedep ];
xmkmf buildInputs = [ libX11 libXext libXt ];
makeFlags="$makeFlags PREFIX=$out BINDIR=$out/bin MANPATH=$out/share/man"
''; makeFlags = [
"PREFIX=$(out)"
"BINDIR=$(out)/bin"
"MANPATH=$(out)/share/man"
];
installTargets = "install install.man";
meta = { meta = {
inherit version; inherit version;

View File

@ -10,15 +10,14 @@ stdenv.mkDerivation {
}; };
# for the builder script # for the builder script
inherit xauth fontDirectories perl; inherit fontDirectories;
gcc = stdenv.cc.cc;
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
buildInputs = [ xlibsWrapper zlib libjpeg imake gccmakedep libXmu libXaw buildInputs = [ xlibsWrapper zlib libjpeg imake gccmakedep libXmu libXaw
libXpm libXp xauth openssh ]; libXpm libXp xauth openssh ];
patchPhase = '' postPatch = ''
fontPath= fontPath=
for i in $fontDirectories; do for i in $fontDirectories; do
for j in $(find $i -name fonts.dir); do for j in $(find $i -name fonts.dir); do
@ -27,37 +26,38 @@ stdenv.mkDerivation {
done done
sed -i "s@/usr/bin/ssh@${openssh}/bin/ssh@g" vncviewer/vncviewer.h sed -i "s@/usr/bin/ssh@${openssh}/bin/ssh@g" vncviewer/vncviewer.h
'';
buildPhase = ''
xmkmf
make World
sed -e 's@/usr/bin/perl@${perl}/bin/perl@' \ sed -e 's@/usr/bin/perl@${perl}/bin/perl@' \
-e 's@unix/:7100@'$fontPath'@' \ -e 's@unix/:7100@'$fontPath'@' \
-i vncserver -i vncserver
cd Xvnc sed -e 's@.* CppCmd .*@#define CppCmd cpp@' -i Xvnc/config/cf/linux.cf
sed -e 's@.* CppCmd .*@#define CppCmd '$gcc'/bin/cpp@' -i config/cf/linux.cf sed -e 's@.* CppCmd .*@#define CppCmd cpp@' -i Xvnc/config/cf/Imake.tmpl
sed -e 's@.* CppCmd .*@#define CppCmd '$gcc'/bin/cpp@' -i config/cf/Imake.tmpl
sed -i \ sed -i \
-e 's@"uname","xauth","Xvnc","vncpasswd"@"uname","Xvnc","vncpasswd"@g' \ -e 's@"uname","xauth","Xvnc","vncpasswd"@"uname","Xvnc","vncpasswd"@g' \
-e "s@\<xauth\>@${xauth}/bin/xauth@g" \ -e "s@\<xauth\>@${xauth}/bin/xauth@g" \
../vncserver vncserver
./configure '';
make
cd .. preInstall = ''
mkdir -p $out/bin
mkdir -p $out/share/man/man1
''; '';
installPhase = '' installPhase = ''
mkdir -p $out/bin runHook preInstall
mkdir -p $out/share/man/man1
./vncinstall $out/bin $out/share/man ./vncinstall $out/bin $out/share/man
runHook postInstall
'';
postInstall = ''
# fix HTTP client: # fix HTTP client:
t=$out/share/tightvnc mkdir -p $out/share/tightvnc
mkdir -p $t cp -r classes $out/share/tightvnc
sed -i "s@/usr/local/vnc/classes@$out/vnc/classes@g" $out/bin/vncserver substituteInPlace $out/bin/vncserver \
cp -r classes $t --replace /usr/local/vnc/classes $out/share/tightvnc/classes
''; '';
meta = { meta = {

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, zlib, libjpeg, libpng, imake}: { stdenv, fetchurl, zlib, libjpeg, libpng, imake, gccmakedep }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "transfig-3.2.4"; name = "transfig-3.2.4";
@ -7,7 +7,8 @@ stdenv.mkDerivation rec {
sha256 = "0429snhp5acbz61pvblwlrwv8nxr6gf12p37f9xxwrkqv4ir7dd4"; sha256 = "0429snhp5acbz61pvblwlrwv8nxr6gf12p37f9xxwrkqv4ir7dd4";
}; };
buildInputs = [zlib libjpeg libpng imake]; nativeBuildInputs = [ imake gccmakedep ];
buildInputs = [ zlib libjpeg libpng ];
patches = [ patches = [
./patch-fig2dev-dev-Imakefile ./patch-fig2dev-dev-Imakefile
@ -45,12 +46,7 @@ stdenv.mkDerivation rec {
runHook postPatch runHook postPatch
''; '';
preBuild = '' makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
xmkmf
make Makefiles
'';
makeFlags = [ "CC=cc" ];
preInstall = '' preInstall = ''
mkdir -p $out mkdir -p $out

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, premake5, ninja }: { stdenv, fetchFromGitHub, premake5 }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "otfcc-${version}"; name = "otfcc-${version}";
@ -11,15 +11,15 @@ stdenv.mkDerivation rec {
sha256 = "1rnjfqqyc6d9nhlh8if9k37wk94mcwz4wf3k239v6idg48nrk10b"; sha256 = "1rnjfqqyc6d9nhlh8if9k37wk94mcwz4wf3k239v6idg48nrk10b";
}; };
nativeBuildInputs = [ premake5 ninja ]; nativeBuildInputs = [ premake5 ];
configurePhase = '' # Dont guess where our makefiles will end up. Just use current
premake5 ninja # directory.
patchPhase = ''
substituteInPlace premake5.lua \
--replace 'location "build/gmake"' 'location "."'
''; '';
ninjaFlags = let x = if stdenv.hostPlatform.isi686 then "x86" else "x64"; in
[ "-C" "build/ninja" "otfccdump_release_${x}" "otfccbuild_release_${x}" ];
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
cp bin/release-x*/otfcc* $out/bin/ cp bin/release-x*/otfcc* $out/bin/

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, xlibsWrapper, imake }: { stdenv, fetchurl, xlibsWrapper, imake, gccmakedep }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "x11-ssh-askpass-1.2.4.1"; name = "x11-ssh-askpass-1.2.4.1";
@ -10,16 +10,16 @@ stdenv.mkDerivation {
sha256 = "620de3c32ae72185a2c9aeaec03af24242b9621964e38eb625afb6cdb30b8c88"; sha256 = "620de3c32ae72185a2c9aeaec03af24242b9621964e38eb625afb6cdb30b8c88";
}; };
nativeBuildInputs = [ imake ]; nativeBuildInputs = [ imake gccmakedep ];
buildInputs = [ xlibsWrapper ]; buildInputs = [ xlibsWrapper ];
configureFlags = [ configureFlags = [
"--with-app-defaults-dir=$out/etc/X11/app-defaults" "--with-app-defaults-dir=$out/etc/X11/app-defaults"
]; ];
preBuild = '' dontUseImakeConfigure = true;
xmkmf postConfigure = ''
make includes xmkmf -a
''; '';
installTargets = [ "install" "install.man" ]; installTargets = [ "install" "install.man" ];

View File

@ -12,16 +12,17 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
nativeBuildInputs = [ imake gccmakedep ];
buildInputs = [ buildInputs = [
libX11 xproto imake gccmakedep libXt libXmu libXaw libX11 xproto libXt libXmu libXaw
libXext xextproto libSM libICE libXpm libXp libXext xextproto libSM libICE libXpm libXp
]; ];
buildPhase = ''xmkmf && make World''; makeFlags = [
"BINDIR=${placeholder "out"}/bin"
installPhase = '' "MANDIR=${placeholder "out"}/share/man"
make DESTDIR=$out BINDIR=/bin MANDIR=/share/man/man1 install install.man ];
''; installTargets = "install install.man";
meta = { meta = {
description = "VNC recorder"; description = "VNC recorder";

View File

@ -20089,8 +20089,6 @@ with pkgs;
xmlcopyeditor = callPackage ../applications/editors/xmlcopyeditor { }; xmlcopyeditor = callPackage ../applications/editors/xmlcopyeditor { };
xmove = callPackage ../applications/misc/xmove { };
xmp = callPackage ../applications/audio/xmp { }; xmp = callPackage ../applications/audio/xmp { };
xnee = callPackage ../tools/X11/xnee { }; xnee = callPackage ../tools/X11/xnee { };