Merge pull request #76674 from jtojnar/structured-attrs-masterable

treewide: structured-attrs fixes
This commit is contained in:
Jan Tojnar 2019-12-30 04:52:45 +01:00 committed by GitHub
commit ea4da9b5fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
45 changed files with 187 additions and 156 deletions

View File

@ -1,6 +1,7 @@
{ stdenv { stdenv
, mkDerivation , mkDerivation
, lib , lib
, fetchpatch
, fetchzip , fetchzip
, pkgconfig , pkgconfig
, qtbase , qtbase
@ -17,6 +18,14 @@
sha256 = "07z8grnnpkd0nf3y3r6qjlk1jlzrbhdrp9mnhrhhmws54p1bhl20"; sha256 = "07z8grnnpkd0nf3y3r6qjlk1jlzrbhdrp9mnhrhhmws54p1bhl20";
}; };
patches = [
# Fix installation without DESTDIR
(fetchpatch {
url = "https://github.com/falkTX/Cadence/commit/1fd3275e7daf4b75f59ef1f85a9e2e93bd5c0731.patch";
sha256 = "0q791jsh8vmjg678dzhbp1ykq8xrrlxl1mbgs3g8if1ccj210vd8";
})
];
nativeBuildInputs = [ nativeBuildInputs = [
pkgconfig pkgconfig
]; ];
@ -26,8 +35,8 @@
]; ];
makeFlags = [ makeFlags = [
"PREFIX=''" "PREFIX=${placeholder "out"}"
"DESTDIR=${placeholder "out"}" "SYSCONFDIR=${placeholder "out"}/etc"
]; ];
propagatedBuildInputs = with python3Packages; [ propagatedBuildInputs = with python3Packages; [

View File

@ -37,15 +37,15 @@ stdenv.mkDerivation {
nativeBuildInputs = [ pkgconfig cmake ]; nativeBuildInputs = [ pkgconfig cmake ];
cmakeFlags = '' cmakeFlags = [
-DprojectM_FONT_MENU=${ttf_bitstream_vera}/share/fonts/truetype/VeraMono.ttf "-DprojectM_FONT_MENU=${ttf_bitstream_vera}/share/fonts/truetype/VeraMono.ttf"
-DprojectM_FONT_TITLE=${ttf_bitstream_vera}/share/fonts/truetype/Vera.ttf "-DprojectM_FONT_TITLE=${ttf_bitstream_vera}/share/fonts/truetype/Vera.ttf"
-DINCLUDE-PROJECTM-TEST=OFF "-DINCLUDE-PROJECTM-TEST=OFF"
-DINCLUDE-PROJECTM-QT=${if withQt then "ON" else "OFF"} "-DINCLUDE-PROJECTM-QT=${if withQt then "ON" else "OFF"}"
-DINCLUDE-PROJECTM-LIBVISUAL=${if withLibvisual then "ON" else "OFF"} "-DINCLUDE-PROJECTM-LIBVISUAL=${if withLibvisual then "ON" else "OFF"}"
-DINCLUDE-PROJECTM-JACK=${if withJack then "ON" else "OFF"} "-DINCLUDE-PROJECTM-JACK=${if withJack then "ON" else "OFF"}"
-DINCLUDE-PROJECTM-PULSEAUDIO=${if withPulseAudio then "ON" else "OFF"} "-DINCLUDE-PROJECTM-PULSEAUDIO=${if withPulseAudio then "ON" else "OFF"}"
''; ];
buildInputs = with stdenv.lib; buildInputs = with stdenv.lib;
[ glew ftgl ] [ glew ftgl ]

View File

@ -97,7 +97,7 @@ stdenv.mkDerivation rec {
done done
''; '';
installTargets = "tags install"; installTargets = [ "tags" "install" ];
postInstall = '' postInstall = ''
mkdir -p $out/share/emacs/site-lisp mkdir -p $out/share/emacs/site-lisp

View File

@ -12,18 +12,15 @@ stdenv.mkDerivation rec {
}; };
makeFlags = [ makeFlags = [
"GIT_VERSION=$(version)" "GIT_VERSION=${version}"
"GIT_TIMESTAMP=" "GIT_TIMESTAMP="
"SHAREDIR=$(out)/share/" "SHAREDIR=${placeholder ''out''}/share/osm2xmap"
"INSTALL_BINDIR=$(out)/bin" "INSTALL_BINDIR=${placeholder ''out''}/bin"
"INSTALL_MANDIR=$(out)/share/man/man1" "INSTALL_MANDIR=${placeholder ''out''}/share/man/man1"
"INSTALL_SHAREDIR=$(out)/share/"
]; ];
NIX_CFLAGS_COMPILE = [ "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" ]; NIX_CFLAGS_COMPILE = [ "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" ];
installFlags = [ "DESTDIR=$(out)" ];
buildInputs = [ libroxml proj libyamlcpp boost ]; buildInputs = [ libroxml proj libyamlcpp boost ];
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -52,7 +52,7 @@ stdenv.mkDerivation {
sed -e "s|^#\!\(.*/perl.*\)$|#\!\1$perlFlags|" -i perl.d/imap-proxy sed -e "s|^#\!\(.*/perl.*\)$|#\!\1$perlFlags|" -i perl.d/imap-proxy
''; '';
buildFlags = if debugBuild then "lumail2-debug" else ""; buildFlags = stdenv.lib.optional debugBuild "lumail2-debug";
installPhase = '' installPhase = ''
mkdir -p $out/bin || true mkdir -p $out/bin || true

View File

@ -39,20 +39,20 @@ stdenv.mkDerivation rec {
}) })
]; ];
cmakeFlags = '' cmakeFlags = [
-DUSE_ASPELL=ON "-DUSE_ASPELL=ON"
-DUSE_QT_QML=ON "-DUSE_QT_QML=ON"
-DFREE_SPACE_BAR_C=ON "-DFREE_SPACE_BAR_C=ON"
-DUSE_MINIUPNP=ON "-DUSE_MINIUPNP=ON"
-DLOCAL_MINIUPNP=ON "-DLOCAL_MINIUPNP=ON"
-DDBUS_NOTIFY=ON "-DDBUS_NOTIFY=ON"
-DUSE_JS=ON "-DUSE_JS=ON"
-DPERL_REGEX=ON "-DPERL_REGEX=ON"
-DUSE_CLI_XMLRPC=ON "-DUSE_CLI_XMLRPC=ON"
-DWITH_SOUNDS=ON "-DWITH_SOUNDS=ON"
-DLUA_SCRIPT=ON "-DLUA_SCRIPT=ON"
-DWITH_LUASCRIPTS=ON "-DWITH_LUASCRIPTS=ON"
''; ];
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -1,4 +1,6 @@
{ stdenv, fetchurl, cmake { stdenv
, fetchurl
, cmake
, singlePrec ? true , singlePrec ? true
, mpiEnabled ? false , mpiEnabled ? false
, fftw , fftw
@ -6,7 +8,6 @@
, perl , perl
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "gromacs-2019.4"; name = "gromacs-2019.4";
@ -19,14 +20,23 @@ stdenv.mkDerivation {
buildInputs = [ fftw perl ] buildInputs = [ fftw perl ]
++ (stdenv.lib.optionals mpiEnabled [ openmpi ]); ++ (stdenv.lib.optionals mpiEnabled [ openmpi ]);
cmakeFlags = '' cmakeFlags = (
${if singlePrec then "-DGMX_DOUBLE=OFF" else "-DGMX_DOUBLE=ON -DGMX_DEFAULT_SUFFIX=OFF"} if singlePrec then [
${if mpiEnabled then "-DGMX_MPI:BOOL=TRUE "-DGMX_DOUBLE=OFF"
-DGMX_CPU_ACCELERATION:STRING=SSE4.1 ] else [
-DGMX_OPENMP:BOOL=TRUE "-DGMX_DOUBLE=ON"
-DGMX_THREAD_MPI:BOOL=FALSE" "-DGMX_DEFAULT_SUFFIX=OFF"
else "-DGMX_MPI:BOOL=FALSE" } ]
''; ) ++ (
if mpiEnabled then [
"-DGMX_MPI:BOOL=TRUE"
"-DGMX_CPU_ACCELERATION:STRING=SSE4.1"
"-DGMX_OPENMP:BOOL=TRUE"
"-DGMX_THREAD_MPI:BOOL=FALSE"
] else [
"-DGMX_MPI:BOOL=FALSE"
]
);
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = "http://www.gromacs.org"; homepage = "http://www.gromacs.org";

View File

@ -1,25 +1,54 @@
{stdenv, fetchurl, ncurses, libjpeg, libX11, libXt, alsaLib, aalib, libXft, xorgproto, libv4l { stdenv
, libFS, libXaw, libXpm, libXext, libSM, libICE, perl, linux}: , fetchurl
, ncurses
, libjpeg
, libX11
, libXt
, alsaLib
, aalib
, libXft
, xorgproto
, libv4l
, libFS
, libXaw
, libXpm
, libXext
, libSM
, libICE
, perl
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "xawtv-3.106"; name = "xawtv-3.106";
src = fetchurl { src = fetchurl {
url = "https://linuxtv.org/downloads/xawtv/${name}.tar.bz2"; url = "https://linuxtv.org/downloads/xawtv/${name}.tar.bz2";
sha256 = "174wd36rk0k23mgx9nlnpc398yd1f0wiv060963axg6sz0v4rksp"; sha256 = "174wd36rk0k23mgx9nlnpc398yd1f0wiv060963axg6sz0v4rksp";
}; };
preConfigure = '' buildInputs = [
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${linux}/lib/modules/${linux.modDirVersion}/build" ncurses
''; libjpeg
libX11
libXt
libXft
xorgproto
libFS
perl
alsaLib
aalib
libXaw
libXpm
libXext
libSM
libICE
libv4l
];
configureFlags= [ "--prefix=" ]; makeFlags = [
"SUID_ROOT=" # do not try to setuid
NIX_LDFLAGS = "-lgcc_s"; "resdir=${placeholder ''out''}/share/X11"
];
makeFlags = "SUID_ROOT= DESTDIR=\$(out) PREFIX=";
buildInputs = [ncurses libjpeg libX11 libXt libXft xorgproto libFS perl alsaLib aalib
libXaw libXpm libXext libSM libICE libv4l];
meta = { meta = {
description = "TV application for Linux with apps and tools such as a teletext browser"; description = "TV application for Linux with apps and tools such as a teletext browser";
@ -28,5 +57,4 @@ stdenv.mkDerivation rec {
maintainers = with stdenv.lib.maintainers; [ domenkozar ]; maintainers = with stdenv.lib.maintainers; [ domenkozar ];
platforms = stdenv.lib.platforms.linux; platforms = stdenv.lib.platforms.linux;
}; };
} }

View File

@ -22,14 +22,14 @@ buildGoPackage rec {
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ go-md2man libseccomp libapparmor apparmor-parser which ]; buildInputs = [ go-md2man libseccomp libapparmor apparmor-parser which ];
makeFlags = ''BUILDTAGS+=seccomp BUILDTAGS+=apparmor''; makeFlags = [ "BUILDTAGS+=seccomp" "BUILDTAGS+=apparmor" ];
buildPhase = '' buildPhase = ''
cd go/src/${goPackagePath} cd go/src/${goPackagePath}
patchShebangs . patchShebangs .
substituteInPlace libcontainer/apparmor/apparmor.go \ substituteInPlace libcontainer/apparmor/apparmor.go \
--replace /sbin/apparmor_parser ${apparmor-parser}/bin/apparmor_parser --replace /sbin/apparmor_parser ${apparmor-parser}/bin/apparmor_parser
make ${makeFlags} runc make ${toString makeFlags} runc
''; '';
installPhase = '' installPhase = ''

View File

@ -47,9 +47,9 @@ let
includeDirs = self.buildDependsAgdaShareAgda includeDirs = self.buildDependsAgdaShareAgda
++ self.sourceDirectories ++ self.topSourceDirectories ++ self.sourceDirectories ++ self.topSourceDirectories
++ [ "." ]; ++ [ "." ];
buildFlags = concatStringsSep " " (map (x: "-i " + x) self.includeDirs); buildFlags = stdenv.lib.concatMap (x: ["-i" x]) self.includeDirs;
agdaWithArgs = "${Agda}/bin/agda ${self.buildFlags}"; agdaWithArgs = "${Agda}/bin/agda ${toString self.buildFlags}";
buildPhase = '' buildPhase = ''
runHook preBuild runHook preBuild

View File

@ -19,9 +19,7 @@ in
patchShebangs ./tools patchShebangs ./tools
''; '';
preConfigure = '' configureFlags = [ "--with-udevdir=${placeholder "out"}/lib/udev" ];
configureFlags="$configureFlags --with-udevdir=$out/lib/udev"
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A repository of data files describing media player capabilities"; description = "A repository of data files describing media player capabilities";

View File

@ -92,7 +92,7 @@ let
attrValues (mkMathcompGenFrom overrides (mathcomp-deps mathcomp-pkg) mathcomp-version); attrValues (mkMathcompGenFrom overrides (mathcomp-deps mathcomp-pkg) mathcomp-version);
enableParallelBuilding = true; enableParallelBuilding = true;
buildFlags = optionalString withDoc "doc"; buildFlags = optional withDoc "doc";
COQBIN = "${coq}/bin/"; COQBIN = "${coq}/bin/";

View File

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
name = "sdl-env"; name = "sdl-env";
paths = buildInputs; paths = buildInputs;
}; };
in "SDLMINUSI=-I${sdl}/include/SDL"; in [ "SDLMINUSI=-I${sdl}/include/SDL" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Guile bindings for SDL"; description = "Guile bindings for SDL";

View File

@ -10,7 +10,7 @@
} @ args: } @ args:
let let
inherit (stdenv.lib) getVersion versionAtLeast; inherit (stdenv.lib) getVersion versionAtLeast optional;
in in
assert versionAtLeast (getVersion erlang) minimumOTPVersion; assert versionAtLeast (getVersion erlang) minimumOTPVersion;
@ -29,9 +29,7 @@ in
inherit debugInfo; inherit debugInfo;
buildFlags = if debugInfo buildFlags = optional debugInfo "ERL_COMPILER_OPTIONS=debug_info";
then "ERL_COMPILER_OPTIONS=debug_info"
else "";
preBuild = '' preBuild = ''
# The build process uses ./rebar. Link it to the nixpkgs rebar # The build process uses ./rebar. Link it to the nixpkgs rebar

View File

@ -16,11 +16,11 @@ stdenv.mkDerivation rec {
cd ../build cd ../build
''; '';
cmakeFlags = '' cmakeFlags = [
-DGDCM_BUILD_APPLICATIONS=ON "-DGDCM_BUILD_APPLICATIONS=ON"
-DGDCM_BUILD_SHARED_LIBS=ON "-DGDCM_BUILD_SHARED_LIBS=ON"
-DGDCM_USE_VTK=ON "-DGDCM_USE_VTK=ON"
''; ];
enableParallelBuilding = true; enableParallelBuilding = true;
buildInputs = [ cmake vtk ] ++ stdenv.lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.ApplicationServices darwin.apple_sdk.frameworks.Cocoa ]; buildInputs = [ cmake vtk ] ++ stdenv.lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.ApplicationServices darwin.apple_sdk.frameworks.Cocoa ];

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation {
buildInputs = [ qt4 ]; buildInputs = [ qt4 ];
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
cmakeFlags = "-DWITH_DOC=OFF"; cmakeFlags = [ "-DWITH_DOC=OFF" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Provides a Qt implementation of the DBusMenu spec"; description = "Provides a Qt implementation of the DBusMenu spec";

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
buildInputs = [ qtbase ]; buildInputs = [ qtbase ];
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
cmakeFlags = "-DWITH_DOC=OFF"; cmakeFlags = [ "-DWITH_DOC=OFF" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://launchpad.net/libdbusmenu-qt; homepage = https://launchpad.net/libdbusmenu-qt;

View File

@ -15,9 +15,9 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
cmakeFlags = " cmakeFlags = [
-DEIGEN_INCLUDE_DIR=${eigen}/include/eigen3 "-DEIGEN_INCLUDE_DIR=${eigen}/include/eigen3"
"; ];
doCheck = true; doCheck = true;
checkTarget = "test"; checkTarget = "test";

View File

@ -16,9 +16,9 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
cmakeFlags = " cmakeFlags = [
-DEIGEN_INCLUDE_DIR=${eigen}/include/eigen3 "-DEIGEN_INCLUDE_DIR=${eigen}/include/eigen3"
"; ];
doCheck = true; doCheck = true;
checkPhase = '' checkPhase = ''

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation {
echo 'INSTALL(DIRECTORY include DESTINATION .)' >> CMakeLists.txt echo 'INSTALL(DIRECTORY include DESTINATION .)' >> CMakeLists.txt
''; '';
cmakeFlags="-DLIBTCOD_SAMPLES=OFF"; cmakeFlags = [ "-DLIBTCOD_SAMPLES=OFF" ];
buildInputs = [ cmake SDL libGLU libGL upx zlib ]; buildInputs = [ cmake SDL libGLU libGL upx zlib ];

View File

@ -52,10 +52,6 @@ stdenv.mkDerivation rec {
qtx11extras qtx11extras
]; ];
# cleanup: the build system creates (empty) $out/$out/share/icons (double prefix)
# if DESTDIR is unset
DESTDIR="/";
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
pkgconfig pkgconfig

View File

@ -11,10 +11,8 @@ with stdenv.lib; stdenv.mkDerivation rec {
sha256 = "1a39nflw7b2n51jfp3fdprnkpgzaspzww1dckfvaigflfli9s8rj"; sha256 = "1a39nflw7b2n51jfp3fdprnkpgzaspzww1dckfvaigflfli9s8rj";
}; };
makeFlags = concatStringsSep " " ( makeFlags = optional (compiler != null) "compiler=${compiler}"
optional (compiler != null) "compiler=${compiler}" ++ ++ optional (stdver != null) "stdver=${stdver}";
optional (stdver != null) "stdver=${stdver}"
);
patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ./glibc-struct-mallinfo.patch; patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ./glibc-struct-mallinfo.patch;

View File

@ -9,7 +9,7 @@ buildPythonPackage rec {
sha256 = "01d71vya2x87f3kl9x0s8xp0n7wixn6ksrd054y7idq3n1mjaxzh"; sha256 = "01d71vya2x87f3kl9x0s8xp0n7wixn6ksrd054y7idq3n1mjaxzh";
}; };
propagatedBuildInputs = [ aenum ] ++ stdenv.lib.optional (pythonOlder "3.4") [ enum34 ]; propagatedBuildInputs = [ aenum ] ++ stdenv.lib.optional (pythonOlder "3.4") enum34;
doCheck = !isPy3k; doCheck = !isPy3k;
# tests are not yet ported. # tests are not yet ported.

View File

@ -22,7 +22,7 @@ buildPythonPackage rec {
postUnpack = "sourceRoot=$sourceRoot/hypothesis-python"; postUnpack = "sourceRoot=$sourceRoot/hypothesis-python";
propagatedBuildInputs = [ attrs coverage ] ++ lib.optional (!isPy3k) [ enum34 ]; propagatedBuildInputs = [ attrs coverage ] ++ lib.optional (!isPy3k) enum34;
checkInputs = [ pytest pytest_xdist flaky mock pexpect ]; checkInputs = [ pytest pytest_xdist flaky mock pexpect ];
inherit doCheck; inherit doCheck;

View File

@ -79,7 +79,7 @@ buildPythonPackage rec {
simplejson simplejson
traits traits
xvfbwrapper xvfbwrapper
] ++ stdenv.lib.optional (!isPy3k) [ ] ++ stdenv.lib.optionals (!isPy3k) [
configparser configparser
futures futures
pathlib2 # darwin doesn't receive this transitively, but it is in install_requires pathlib2 # darwin doesn't receive this transitively, but it is in install_requires

View File

@ -27,7 +27,7 @@ buildPythonPackage rec {
# gcc6 patch was also sent upstream: https://github.com/pyside/Shiboken/pull/86 # gcc6 patch was also sent upstream: https://github.com/pyside/Shiboken/pull/86
patches = [ ./gcc6.patch ] ++ (lib.optional (isPy35 || isPy36 || isPy37) ./shiboken_py35.patch); patches = [ ./gcc6.patch ] ++ (lib.optional (isPy35 || isPy36 || isPy37) ./shiboken_py35.patch);
cmakeFlags = if isPy3k then "-DUSE_PYTHON3=TRUE" else null; cmakeFlags = lib.optional isPy3k "-DUSE_PYTHON3=TRUE";
meta = { meta = {
description = "Plugin (front-end) for pyside-generatorrunner, that generates bindings for C++ libraries using CPython source code"; description = "Plugin (front-end) for pyside-generatorrunner, that generates bindings for C++ libraries using CPython source code";

View File

@ -19,7 +19,7 @@ buildPythonPackage rec {
sha256 = "1hslzzinpwc1zqhbpllqh3sllmiyk69pcycl7ahr0rz3micgwczj"; sha256 = "1hslzzinpwc1zqhbpllqh3sllmiyk69pcycl7ahr0rz3micgwczj";
}; };
propagatedBuildInputs = [ pytest py-cpuinfo ] ++ lib.optional (pythonOlder "3.4") [ pathlib statistics ]; propagatedBuildInputs = [ pytest py-cpuinfo ] ++ lib.optionals (pythonOlder "3.4") [ pathlib statistics ];
meta = { meta = {
description = "Py.test fixture for benchmarking code"; description = "Py.test fixture for benchmarking code";

View File

@ -40,7 +40,7 @@ buildPythonPackage rec {
python-dateutil python-dateutil
six six
more-itertools more-itertools
] ++ lib.optional (!isPy3k) [ ] ++ lib.optionals (!isPy3k) [
pyOpenSSL pyOpenSSL
ndg-httpsclient ndg-httpsclient
pyasn1 pyasn1

View File

@ -23,7 +23,7 @@ buildPythonPackage rec {
''; '';
propagatedBuildInputs = [ numpy ] propagatedBuildInputs = [ numpy ]
++ lib.optional isPy27 [ futures enum34 pathlib ]; ++ lib.optionals isPy27 [ futures enum34 pathlib ];
meta = with lib; { meta = with lib; {
description = "Read and write image data from and to TIFF files."; description = "Read and write image data from and to TIFF files.";

View File

@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
buildInputs = [ pcre ]; buildInputs = [ pcre ];
nativeBuildInputs = [ libxslt docbook_xsl docbook_xml_dtd_45 ]; nativeBuildInputs = [ libxslt docbook_xsl docbook_xml_dtd_45 ];
makeFlags = ''PREFIX=$(out) CFGDIR=$(out)/cfg HAVE_RULES=yes''; makeFlags = [ "PREFIX=$(out)" "CFGDIR=$(out)/cfg" "HAVE_RULES=yes" ];
outputs = [ "out" "man" ]; outputs = [ "out" "man" ];

View File

@ -33,7 +33,7 @@ stdenv.mkDerivation {
doCheck = true; doCheck = true;
checkFlags = "units"; checkFlags = [ "units" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A maintained ctags implementation"; description = "A maintained ctags implementation";

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "0gjkk4gxzqmxfdirrz2lr0bms6l9fc31vkmlywigkbdlh8wxgypp"; sha256 = "0gjkk4gxzqmxfdirrz2lr0bms6l9fc31vkmlywigkbdlh8wxgypp";
}; };
makeFlags = ''CC=cc PREFIX=$(out) CURSES=-lncurses''; makeFlags = [ "CC=cc" "PREFIX=$(out)" "CURSES=-lncurses" ];
buildInputs = [ ncurses ]; buildInputs = [ ncurses ];

View File

@ -9,10 +9,9 @@ stdenv.mkDerivation rec {
buildInputs = [ libX11 libXaw ]; buildInputs = [ libX11 libXaw ];
preBuild = '' makeFlags = [
substituteInPlace Makefile \ "INSTDIR=${placeholder ''out''}"
--replace /usr/local $out ];
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://www.gedanken.org.uk/software/xbomb/; homepage = http://www.gedanken.org.uk/software/xbomb/;

View File

@ -124,8 +124,8 @@ let
prePatch = prePatchCommon; prePatch = prePatchCommon;
inherit patches; inherit patches;
postPatch = "cd ./utils"; postPatch = "cd ./utils";
makeFlags = ''LANGS=''; makeFlags = [ "LANGS=" ];
installFlags = ''DESTDIR=$(out) BINDIR=$(out)/bin VIM_INSTALL_PATH=$(out)/share PYPREFIX=''; installFlags = [ "DESTDIR=$(out)" "BINDIR=$(out)/bin" "VIM_INSTALL_PATH=$(out)/share" "PYPREFIX=" ];
postInstall = '' postInstall = ''
for prog in aa-audit aa-autodep aa-cleanprof aa-complain aa-disable aa-enforce aa-genprof aa-logprof aa-mergeprof aa-status aa-unconfined ; do for prog in aa-audit aa-autodep aa-cleanprof aa-complain aa-disable aa-enforce aa-genprof aa-logprof aa-mergeprof aa-status aa-unconfined ; do
@ -162,8 +162,8 @@ let
prePatch = prePatchCommon; prePatch = prePatchCommon;
postPatch = "cd ./binutils"; postPatch = "cd ./binutils";
makeFlags = ''LANGS= USE_SYSTEM=1''; makeFlags = [ "LANGS=" "USE_SYSTEM=1" ];
installFlags = ''DESTDIR=$(out) BINDIR=$(out)/bin''; installFlags = [ "DESTDIR=$(out)" "BINDIR=$(out)/bin" ];
inherit doCheck; inherit doCheck;
@ -187,8 +187,11 @@ let
''; '';
inherit patches; inherit patches;
postPatch = "cd ./parser"; postPatch = "cd ./parser";
makeFlags = ''LANGS= USE_SYSTEM=1 INCLUDEDIR=${libapparmor}/include AR=${stdenv.cc.bintools.targetPrefix}ar''; makeFlags = [
installFlags = ''DESTDIR=$(out) DISTRO=unknown''; "LANGS=" "USE_SYSTEM=1" "INCLUDEDIR=${libapparmor}/include"
"AR=${stdenv.cc.bintools.targetPrefix}ar"
];
installFlags = [ "DESTDIR=$(out)" "DISTRO=unknown" ];
inherit doCheck; inherit doCheck;
@ -204,8 +207,8 @@ let
buildInputs = [ libapparmor pam ]; buildInputs = [ libapparmor pam ];
postPatch = "cd ./changehat/pam_apparmor"; postPatch = "cd ./changehat/pam_apparmor";
makeFlags = ''USE_SYSTEM=1''; makeFlags = [ "USE_SYSTEM=1" ];
installFlags = ''DESTDIR=$(out)''; installFlags = [ "DESTDIR=$(out)" ];
inherit doCheck; inherit doCheck;
@ -219,7 +222,7 @@ let
nativeBuildInputs = [ which ]; nativeBuildInputs = [ which ];
postPatch = "cd ./profiles"; postPatch = "cd ./profiles";
installFlags = ''DESTDIR=$(out) EXTRAS_DEST=$(out)/share/apparmor/extra-profiles''; installFlags = [ "DESTDIR=$(out)" "EXTRAS_DEST=$(out)/share/apparmor/extra-profiles" ];
inherit doCheck; inherit doCheck;

View File

@ -211,6 +211,7 @@ stdenv.mkDerivation rec {
"--localstatedir=/var" "--localstatedir=/var"
"--sysconfdir=/etc" "--sysconfdir=/etc"
"-Dsysconfdir_install=${placeholder "out"}/etc" "-Dsysconfdir_install=${placeholder "out"}/etc"
"--libexecdir=${placeholder "out"}/libexec"
] ++ stdenv.lib.optionals (!haveDell) [ ] ++ stdenv.lib.optionals (!haveDell) [
"-Dplugin_dell=false" "-Dplugin_dell=false"
"-Dplugin_synaptics=false" "-Dplugin_synaptics=false"
@ -220,12 +221,6 @@ stdenv.mkDerivation rec {
"-Dplugin_flashrom=true" "-Dplugin_flashrom=true"
]; ];
# TODO: We need to be able to override the directory flags from meson setup hook
# better declaring them multiple times might become an error.
preConfigure = ''
mesonFlagsArray+=("--libexecdir=$out/libexec")
'';
postInstall = '' postInstall = ''
moveToOutput share/installed-tests "$installedTests" moveToOutput share/installed-tests "$installedTests"
wrapProgram $installedTests/share/installed-tests/fwupd/hardware.py \ wrapProgram $installedTests/share/installed-tests/fwupd/hardware.py \

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation {
mkdir -p "$out/bin" mkdir -p "$out/bin"
mkdir -p "$out/share/man/man8" mkdir -p "$out/share/man/man8"
''; '';
makeFlags='' prefix="''${out}" manprefix="''${out}/share/" ''; makeFlags = [ "prefix=$(out)" "manprefix=$(out)/share/" ];
meta = { meta = {
inherit (s) version; inherit (s) version;
description = ''Tool to detach from controlling TTY and attach to another''; description = ''Tool to detach from controlling TTY and attach to another'';

View File

@ -25,9 +25,7 @@ stdenv.mkDerivation rec {
# Filesystem resize functions were reintroduced in parted 3.1 due to no other available free alternatives # Filesystem resize functions were reintroduced in parted 3.1 due to no other available free alternatives
# but in a sepparate library -> libparted-fs-resize --- that's why the added LDFLAG # but in a sepparate library -> libparted-fs-resize --- that's why the added LDFLAG
makeFlags = '' makeFlags = [ "LDFLAGS=-lparted-fs-resize" ];
LDFLAGS=-lparted-fs-resize
'';
propagatedBuildInputs = [ parted utillinux ]; propagatedBuildInputs = [ parted utillinux ];

View File

@ -75,20 +75,20 @@ stdenv.mkDerivation rec {
libxkbcommon libxml2 dbus cairo gtk2 gtk3 pango qt4 libuuid libxkbcommon libxml2 dbus cairo gtk2 gtk3 pango qt4 libuuid
]; ];
cmakeFlags = '' cmakeFlags = [
-DENABLE_QT_IM_MODULE=ON "-DENABLE_QT_IM_MODULE=ON"
-DENABLE_GTK2_IM_MODULE=ON "-DENABLE_GTK2_IM_MODULE=ON"
-DENABLE_GTK3_IM_MODULE=ON "-DENABLE_GTK3_IM_MODULE=ON"
-DENABLE_GIR=OFF "-DENABLE_GIR=OFF"
-DENABLE_OPENCC=OFF "-DENABLE_OPENCC=OFF"
-DENABLE_PRESAGE=OFF "-DENABLE_PRESAGE=OFF"
-DENABLE_XDGAUTOSTART=OFF "-DENABLE_XDGAUTOSTART=OFF"
-DENABLE_PINYIN=${if withPinyin then "ON" else "OFF"} "-DENABLE_PINYIN=${if withPinyin then "ON" else "OFF"}"
-DENABLE_TABLE=ON "-DENABLE_TABLE=ON"
-DENABLE_SPELL=ON "-DENABLE_SPELL=ON"
-DENABLE_QT_GUI=ON "-DENABLE_QT_GUI=ON"
-DXKB_RULES_XML_FILE='${xkeyboard_config}/share/X11/xkb/rules/evdev.xml' "-DXKB_RULES_XML_FILE='${xkeyboard_config}/share/X11/xkb/rules/evdev.xml'"
''; ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://github.com/fcitx/fcitx; homepage = https://github.com/fcitx/fcitx;

View File

@ -9,12 +9,13 @@ stdenv.mkDerivation rec {
sha256 = "0xf0r6zxaqan1drz61nqf95p2pkiiihpvrjhrr9dx9j3vswyx31g"; sha256 = "0xf0r6zxaqan1drz61nqf95p2pkiiihpvrjhrr9dx9j3vswyx31g";
}; };
buildFlags = with stdenv; buildFlags = with stdenv; [ (
if isDarwin then "osx" if isDarwin then "osx"
else if isFreeBSD then "freebsd" else if isFreeBSD then "freebsd"
else "cpulimit"; else "cpulimit"
) ];
installFlags = "PREFIX=$(out)"; installFlags = [ "PREFIX=$(out)" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://limitcpu.sourceforge.net/; homepage = http://limitcpu.sourceforge.net/;

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation {
buildInputs = [ unzip ]; buildInputs = [ unzip ];
buildFlags = if stdenv.cc.isClang then [ "CC=clang" ] else null; buildFlags = stdenv.lib.optional stdenv.cc.isClang "CC=clang";
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin

View File

@ -11,14 +11,13 @@ let
inherit sha256; inherit sha256;
}; };
nativeBuildInputs = [] ++ nativeBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ which cctools ];
stdenv.lib.optionals stdenv.isDarwin [ which cctools ];
patches = stdenv.lib.optional stdenv.isFreeBSD ./freebsd.patch; patches = stdenv.lib.optional stdenv.isFreeBSD ./freebsd.patch;
doCheck = !stdenv.isFreeBSD; doCheck = !stdenv.isFreeBSD;
makeFlags = "PREFIX=$(out) INSTALLPREFIX=$(out)"; makeFlags = [ "PREFIX=$(out)" "INSTALLPREFIX=$(out)" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://miniupnp.free.fr/; homepage = http://miniupnp.free.fr/;

View File

@ -8,12 +8,12 @@ stdenv.mkDerivation ({
sha256 = "0a2a00hbakh0640r2wdpnwr8789z59wnk7rfsihh3j0vbhmmmqak"; sha256 = "0a2a00hbakh0640r2wdpnwr8789z59wnk7rfsihh3j0vbhmmmqak";
}; };
makeFlags = if stdenv.isDarwin makeFlags = [ (if stdenv.isDarwin
then "osx" then "osx"
else "lnp" # Linux with PAM modules; else "lnp") ] # Linux with PAM modules;
# -fPIC is required to compile php with imap on x86_64 systems # -fPIC is required to compile php with imap on x86_64 systems
+ stdenv.lib.optionalString stdenv.isx86_64 " EXTRACFLAGS=-fPIC" ++ stdenv.lib.optional stdenv.isx86_64 "EXTRACFLAGS=-fPIC"
+ stdenv.lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) " CC=${stdenv.hostPlatform.config}-gcc RANLIB=${stdenv.hostPlatform.config}-ranlib"; ++ stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "CC=${stdenv.hostPlatform.config}-gcc" "RANLIB=${stdenv.hostPlatform.config}-ranlib" ];
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake pkgconfig ]; nativeBuildInputs = [ cmake pkgconfig ];
cmakeFlags="-DPYTHON_DESIRED=${stdenv.lib.substring 0 1 python.pythonVersion}"; cmakeFlags = ["-DPYTHON_DESIRED=${stdenv.lib.substring 0 1 python.pythonVersion}" ];
buildInputs = [ python libxml2 glib openssl curl check gpgme ]; buildInputs = [ python libxml2 glib openssl curl check gpgme ];

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation {
${if static then "LDFLAGS=-static --enable-static --disable-shared" else "--enable-shared"} ${if static then "LDFLAGS=-static --enable-static --disable-shared" else "--enable-shared"}
) )
''; '';
makeFlags = if static then "AM_LDFLAGS=-all-static" else ""; makeFlags = stdenv.lib.optional static "AM_LDFLAGS=-all-static";
dontDisableStatic = static; dontDisableStatic = static;
meta = with lib; { meta = with lib; {

View File

@ -14,7 +14,9 @@ stdenv.mkDerivation rec {
# _FORTIFY_SOURCE requires compiling with optimization (-O) # _FORTIFY_SOURCE requires compiling with optimization (-O)
NIX_CFLAGS_COMPILE = "-O"; NIX_CFLAGS_COMPILE = "-O";
makeFlags = [ "DESTDIR=$(out)" "PREFIX=" ]; makeFlags = [
"PREFIX=${placeholder "out"}"
];
meta = with lib; { meta = with lib; {
description = "simple markup - markdown like syntax"; description = "simple markup - markdown like syntax";