Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

treewide: use scons setup hook

Lots of packages can use it. Here is the list:

- jackmix
- klick
- mixx
- nova-filters
- rhvoice
- giv
- mypaint
- swift-im
- bombono
- mapnik
- serf
- nuitka
- pyexiv2
- godot
- hammer
- toluapp
- btanks
- dxx-rebirth
- endless-sky
- globulation
- the-powder-toy
- fceux
- gpsd
- mongodb
- rippled
- mariadb
- lprof

+149 -260
+1 -5
pkgs/applications/audio/jackmix/default.nix
··· 17 17 jack 18 18 ]; 19 19 20 - buildPhase = '' 21 - scons 22 - ''; 23 20 installPhase = '' 24 - mkdir -p $out/bin 25 - cp jackmix/jackmix $out/bin 21 + install -D jackmix/jackmix $out/bin/jackmix 26 22 ''; 27 23 28 24 meta = {
+1 -8
pkgs/applications/audio/klick/default.nix
··· 12 12 13 13 nativeBuildInputs = [ pkgconfig ]; 14 14 buildInputs = [ scons libsamplerate libsndfile liblo libjack2 boost ]; 15 + prefixKey = "PREFIX="; 15 16 NIX_CFLAGS_COMPILE = "-fpermissive"; 16 17 17 - buildPhase = '' 18 - mkdir -p $out 19 - scons PREFIX=$out 20 - ''; 21 - 22 - installPhase = "scons install"; 23 - 24 18 meta = { 25 19 homepage = http://das.nasophon.de/klick/; 26 20 description = "Advanced command-line metronome for JACK"; ··· 28 22 platforms = stdenv.lib.platforms.linux; 29 23 }; 30 24 } 31 -
+1 -16
pkgs/applications/audio/mixxx/default.nix
··· 32 32 "opus=1" 33 33 ]; 34 34 35 - buildPhase = '' 36 - runHook preBuild 37 - mkdir -p "$out" 38 - scons \ 39 - -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES \ 40 - $sconsFlags "prefix=$out" 41 - runHook postBuild 42 - ''; 43 - 44 - installPhase = '' 45 - runHook preInstall 46 - scons $sconsFlags "prefix=$out" install 47 - runHook postInstall 48 - ''; 49 - 50 35 fixupPhase = '' 51 36 wrapProgram $out/bin/mixxx \ 52 37 --set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive; 53 38 ''; 54 - 39 + 55 40 meta = with stdenv.lib; { 56 41 homepage = https://mixxx.org; 57 42 description = "Digital DJ mixing software";
-8
pkgs/applications/audio/nova-filters/default.nix
··· 21 21 sed -i "s/= check/= detail::filter_base<internal_type, checked>::check/" nova/source/dsp/filter.hpp 22 22 ''; 23 23 24 - buildPhase = '' 25 - scons 26 - ''; 27 - 28 - installPhase = '' 29 - scons $sconsFlags "prefix=$out" install 30 - ''; 31 - 32 24 meta = with stdenv.lib; { 33 25 description = "LADSPA plugins based on filters of nova"; 34 26 homepage = http://klingt.org/~tim/nova-filters/;
+2 -10
pkgs/applications/audio/rhvoice/default.nix
··· 1 - { stdenv, lib, pkgconfig, fetchFromGitHub, scons, python, glibmm, libpulseaudio, libao 2 - }: 1 + { stdenv, lib, pkgconfig, fetchFromGitHub, scons 2 + , python, glibmm, libpulseaudio, libao }: 3 3 4 4 let 5 5 version = "unstable-2018-02-10"; ··· 29 29 # - RPATH, to link to the newly built libraries 30 30 31 31 patches = [ ./honor_nix_environment.patch ]; 32 - 33 - buildPhase = '' 34 - scons prefix=$out 35 - ''; 36 - 37 - installPhase = '' 38 - scons install 39 - ''; 40 32 41 33 meta = { 42 34 description = "A free and open source speech synthesizer for Russian language and others";
+2 -6
pkgs/applications/graphics/giv/default.nix
··· 1 - { stdenv, fetchFromGitHub, gdk_pixbuf, scons, pkgconfig, gtk2, glib, 2 - pcre, cfitsio, perl, gob2, vala, libtiff, json-glib }: 1 + { stdenv, fetchFromGitHub, gdk_pixbuf, scons, pkgconfig, gtk2, glib 2 + , pcre, cfitsio, perl, gob2, vala, libtiff, json-glib }: 3 3 4 4 stdenv.mkDerivation rec { 5 5 name = "giv-${version}"; ··· 20 20 ''; 21 21 22 22 patches = [ ./build.patch ]; 23 - 24 - buildPhase = "scons"; 25 - 26 - installPhase = "scons install"; 27 23 28 24 nativeBuildInputs = [ scons pkgconfig vala perl gob2 ]; 29 25 buildInputs = [ gdk_pixbuf gtk2 glib pcre cfitsio libtiff json-glib ];
+1 -4
pkgs/applications/graphics/mypaint/default.nix
··· 26 26 27 27 propagatedBuildInputs = [ numpy ]; 28 28 29 - buildPhase = "scons prefix=$out"; 30 - 31 - installPhase = '' 32 - scons prefix=$out install 29 + postInstall = '' 33 30 sed -i -e 's|/usr/bin/env python2.7|${python}/bin/python|' $out/bin/mypaint 34 31 ''; 35 32
+5 -9
pkgs/applications/networking/instant-messengers/swift-im/default.nix
··· 3 3 , lua, miniupnpc, openssl, qtbase, qtmultimedia, qtsvg, qtwebkit, qtx11extras, zlib 4 4 }: 5 5 6 - let 7 - _scons = "scons -j$NIX_BUILD_CORES"; 8 - in stdenv.mkDerivation rec { 6 + stdenv.mkDerivation rec { 9 7 name = "swift-im-${version}"; 10 8 version = "4.0.2"; 11 9 ··· 30 28 "-I${miniupnpc}/include/miniupnpc" 31 29 "-I${qtwebkit.dev}/include/QtWebKit" 32 30 "-I${qtwebkit.dev}/include/QtWebKitWidgets" 31 + "-fpermissive" 33 32 ]; 34 33 35 - buildPhase = '' 36 - ${_scons} Swift 37 - ''; 38 - 39 - installPhase = '' 40 - ${_scons} SWIFT_INSTALLDIR=$out $out 34 + preInstall = '' 35 + installTargets="$out" 36 + installFlags+=" SWIFT_INSTALLDIR=$out" 41 37 ''; 42 38 43 39 meta = with stdenv.lib; {
+1 -7
pkgs/applications/video/bombono/default.nix
··· 35 35 libxmlxx ffmpeg enca 36 36 ]; 37 37 38 - buildPhase = '' 39 - scons PREFIX=$out -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES 40 - ''; 38 + prefixKey = "PREFIX="; 41 39 42 40 enableParallelBuilding = true; 43 - 44 - installPhase = '' 45 - scons install 46 - ''; 47 41 48 42 meta = { 49 43 description = "a DVD authoring program for personal computers";
+28 -33
pkgs/development/libraries/mapnik/default.nix
··· 29 29 postgresql 30 30 ]; 31 31 32 - configurePhase = '' 33 - scons configure PREFIX="$out" BOOST_INCLUDES="${boost.dev}/include" \ 34 - BOOST_LIBS="${boost.out}/lib" \ 35 - CAIRO_INCLUDES="${cairo.dev}/include" \ 36 - CAIRO_LIBS="${cairo.out}/lib" \ 37 - FREETYPE_INCLUDES="${freetype.dev}/include" \ 38 - FREETYPE_LIBS="${freetype.out}/lib" \ 39 - GDAL_CONFIG="${gdal}/bin/gdal-config" \ 40 - HB_INCLUDES="${harfbuzz.dev}/include" \ 41 - HB_LIBS="${harfbuzz.out}/lib" \ 42 - ICU_INCLUDES="${icu.dev}/include" \ 43 - ICU_LIBS="${icu.out}/lib" \ 44 - JPEG_INCLUDES="${libjpeg.dev}/include" \ 45 - JPEG_LIBS="${libjpeg.out}/lib" \ 46 - PNG_INCLUDES="${libpng.dev}/include" \ 47 - PNG_LIBS="${libpng.out}/lib" \ 48 - PROJ_INCLUDES="${proj}/include" \ 49 - PROJ_LIBS="${proj}/lib" \ 50 - SQLITE_INCLUDES="${sqlite.dev}/include" \ 51 - SQLITE_LIBS="${sqlite.out}/lib" \ 52 - TIFF_INCLUDES="${libtiff.dev}/include" \ 53 - TIFF_LIBS="${libtiff.out}/lib" \ 54 - WEBP_INCLUDES="${libwebp}/include" \ 55 - WEBP_LIBS="${libwebp}/lib" \ 56 - XML2_INCLUDES="${libxml2.dev}/include" \ 57 - XML2_LIBS="${libxml2.out}/lib" 58 - ''; 32 + prefixKey = "PREFIX="; 59 33 60 - buildPhase = false; 61 - 62 - installPhase = '' 63 - mkdir -p "$out" 64 - scons install 65 - ''; 34 + sconsFlags = [ 35 + "BOOST_INCLUDES=${boost.dev}/include" 36 + "BOOST_LIBS=${boost.out}/lib" 37 + "CAIRO_INCLUDES=${cairo.dev}/include" 38 + "CAIRO_LIBS=${cairo.out}/lib" 39 + "FREETYPE_INCLUDES=${freetype.dev}/include" 40 + "FREETYPE_LIBS=${freetype.out}/lib" 41 + "GDAL_CONFIG=${gdal}/bin/gdal-config" 42 + "HB_INCLUDES=${harfbuzz.dev}/include" 43 + "HB_LIBS=${harfbuzz.out}/lib" 44 + "ICU_INCLUDES=${icu.dev}/include" 45 + "ICU_LIBS=${icu.out}/lib" 46 + "JPEG_INCLUDES=${libjpeg.dev}/include" 47 + "JPEG_LIBS=${libjpeg.out}/lib" 48 + "PNG_INCLUDES=${libpng.dev}/include" 49 + "PNG_LIBS=${libpng.out}/lib" 50 + "PROJ_INCLUDES=${proj}/include" 51 + "PROJ_LIBS=${proj}/lib" 52 + "SQLITE_INCLUDES=${sqlite.dev}/include" 53 + "SQLITE_LIBS=${sqlite.out}/lib" 54 + "TIFF_INCLUDES=${libtiff.dev}/include" 55 + "TIFF_LIBS=${libtiff.out}/lib" 56 + "WEBP_INCLUDES=${libwebp}/include" 57 + "WEBP_LIBS=${libwebp}/lib" 58 + "XML2_INCLUDES=${libxml2.dev}/include" 59 + "XML2_LIBS=${libxml2.out}/lib" 60 + ]; 66 61 67 62 meta = with stdenv.lib; { 68 63 description = "An open source toolkit for developing mapping applications";
+11 -17
pkgs/development/libraries/serf/default.nix
··· 9 9 sha256 = "1k47gbgpp52049andr28y28nbwh9m36bbb0g8p0aka3pqlhjv72l"; 10 10 }; 11 11 12 - nativeBuildInputs = [ pkgconfig ]; 13 - buildInputs = [ apr scons openssl aprutil zlib libiconv ] 12 + nativeBuildInputs = [ pkgconfig scons ]; 13 + buildInputs = [ apr openssl aprutil zlib libiconv ] 14 14 ++ stdenv.lib.optional (!stdenv.isCygwin) kerberos; 15 15 16 16 patches = [ ./scons.patch ]; 17 17 18 - buildPhase = '' 19 - scons \ 20 - -j $NIX_BUILD_CORES \ 21 - APR="$(echo ${apr.dev}/bin/*-config)" \ 22 - APU="$(echo ${aprutil.dev}/bin/*-config)" \ 23 - CC=$CC \ 24 - OPENSSL=${openssl} \ 25 - PREFIX="$out" \ 26 - ZLIB=${zlib} \ 27 - ${ 28 - if stdenv.isCygwin then "" else "GSSAPI=${kerberos.dev}" 29 - } 30 - ''; 18 + prefixKey = "PREFIX="; 31 19 32 - installPhase = '' 33 - scons install 20 + preConfigure = '' 21 + sconsFlags+=" APR=$(echo ${apr.dev}/bin/*-config)" 22 + sconsFlags+=" APU=$(echo ${aprutil.dev}/bin/*-config)" 23 + sconsFlags+=" CC=$CC" 24 + sconsFlags+=" OPENSSL=${openssl}" 25 + sconsFlags+=" ZLIB=${zlib}" 26 + '' + stdenv.lib.optionalString (!stdenv.isCygwin) '' 27 + sconsFlags+=" GSSAPI=${kerberos.dev}" 34 28 ''; 35 29 36 30 enableParallelBuilding = true;
+12 -10
pkgs/development/libraries/swiften/default.nix
··· 1 - { stdenv, python, fetchurl, openssl, boost }: 1 + { stdenv, python, fetchurl, openssl, boost, scons }: 2 2 stdenv.mkDerivation rec { 3 3 name = "swiften-${version}"; 4 4 version = "4.0.2"; 5 5 6 + nativeBuildInputs = [ scons]; 6 7 buildInputs = [ python ]; 7 8 propagatedBuildInputs = [ openssl boost ]; 8 9 ··· 10 11 url = "https://swift.im/downloads/releases/swift-${version}/swift-${version}.tar.gz"; 11 12 sha256 = "0w0aiszjd58ynxpacwcgf052zpmbpcym4dhci64vbfgch6wryz0w"; 12 13 }; 13 - 14 - buildPhase = '' 15 - patchShebangs ./scons 16 - ./scons openssl=${openssl.dev} \ 17 - boost_includedir=${boost.dev}/include \ 18 - boost_libdir=${boost.out}/lib \ 19 - boost_bundled_enable=false \ 20 - SWIFTEN_INSTALLDIR=$out $out 14 + 15 + sconsFlags = [ 16 + "openssl=${openssl.dev}" 17 + "boost_includedir=${boost.dev}/include" 18 + "boost_libdir=${boost.out}/lib" 19 + "boost_bundled_enable=false" 20 + ]; 21 + preInstall = '' 22 + installTargets="$out" 23 + installFlags+=" SWIFT_INSTALLDIR=$out" 21 24 ''; 22 - installPhase = "true"; 23 25 24 26 meta = with stdenv.lib; { 25 27 description = "An XMPP library for C++, used by the Swift client";
+2 -3
pkgs/development/python-modules/nuitka/default.nix
··· 22 22 sha256 = "01vm8mqhpdrwlxw6rxbg3wz51njq69yn862141mja00mllg3j7pg"; 23 23 }; 24 24 25 - buildInputs = stdenv.lib.optionals doCheck [ vmprof pyqt4 ]; 26 - 27 - propagatedBuildInputs = [ scons ]; 25 + checkInputs = [ vmprof pyqt4 ]; 26 + nativeBuildInputs = [ scons ]; 28 27 29 28 postPatch = '' 30 29 patchShebangs tests/run-tests
+3 -4
pkgs/development/python-modules/pyexiv2/default.nix
··· 10 10 sha256 = "09r1ga6kj5cnmrldpkqzvdhh7xi7aad9g4fbcr1gawgsd9y13g0a"; 11 11 }; 12 12 13 - buildPhase = '' 13 + preBuild = '' 14 14 sed -i -e "s@env = Environment()@env = Environment( ENV = os.environ )@" src/SConscript 15 - scons 16 15 ''; 17 - installPhase = '' 16 + 17 + preInstall = '' 18 18 sed -i -e "s@ python_lib_path = get_python_lib(plat_specific=True)@ python_lib_path = \'/lib/python2.7/site-packages\'@" src/SConscript 19 - scons install DESTDIR=$out 20 19 ''; 21 20 22 21 buildInputs = [ python exiv2 scons boost ];
+3 -4
pkgs/development/tools/godot/default.nix
··· 33 33 34 34 enableParallelBuilding = true; 35 35 36 - buildPhase = '' 37 - scons target=release_debug platform=x11 prefix=$out -j $NIX_BUILD_CORES \ 38 - ${lib.concatStringsSep " " 39 - (lib.mapAttrsToList (k: v: "${k}=${builtins.toJSON v}") options)} 36 + sconsFlags = "target=release_debug platform=x11"; 37 + preConfigure = '' 38 + sconsFlags+=" ${lib.concatStringsSep " " (lib.mapAttrsToList (k: v: "${k}=${builtins.toJSON v}") options)}" 40 39 ''; 41 40 42 41 outputs = [ "out" "dev" "man" ];
+1 -3
pkgs/development/tools/parsing/hammer/default.nix
··· 12 12 13 13 nativeBuildInputs = [ pkgconfig ]; 14 14 buildInputs = [ glib python scons ]; 15 - buildPhase = "scons prefix=$out"; 16 - installPhase = "scons prefix=$out install"; 17 15 18 16 meta = with stdenv.lib; { 19 17 description = "A bit-oriented parser combinator library"; ··· 28 26 homepage = https://github.com/UpstandingHackers/hammer; 29 27 license = licenses.gpl2; 30 28 platforms = platforms.linux; 31 - }; 29 + }; 32 30 }
+2 -5
pkgs/development/tools/toluapp/default.nix
··· 11 11 sha256 = "0zd55bc8smmgk9j4cf0jpibb03lgsvl0knpwhplxbv93mcdnw7s0"; 12 12 }; 13 13 14 - buildInputs = [ lua scons ]; 14 + nativeBuildInputs = [ scons ]; 15 + buildInputs = [ lua ]; 15 16 16 17 patches = [ ./environ-and-linux-is-kinda-posix.patch ]; 17 18 ··· 19 20 substituteInPlace config_posix.py \ 20 21 --replace /usr/local $out 21 22 ''; 22 - 23 - buildPhase = ''scons''; 24 - 25 - installPhase = ''scons install''; 26 23 27 24 meta = with stdenv.lib; { 28 25 description = "A tool to integrate C/Cpp code with Lua";
+13 -16
pkgs/games/btanks/default.nix
··· 14 14 15 15 NIX_CFLAGS_COMPILE = "-I${SDL_image}/include/SDL"; 16 16 17 - patches = [ (fetchpatch { 18 - name = "gcc-4.7.patch"; 19 - url = "https://anonscm.debian.org/viewvc/pkg-games/packages/trunk/btanks/debian/patches/gcc-4.7.patch?revision=13641&view=co&pathrev=15758"; 20 - sha256 = "1dxlk1xh69gj10sqcsyckiakb8an3h41206wby4z44mpmvxc7pi4"; 21 - }) ]; 17 + patches = [ 18 + (fetchpatch { 19 + url = "https://sources.debian.org/data/main/b/btanks/0.9.8083-7/debian/patches/gcc-4.7.patch"; 20 + sha256 = "1dxlk1xh69gj10sqcsyckiakb8an3h41206wby4z44mpmvxc7pi4"; 21 + }) 22 + (fetchpatch { 23 + url = "https://sources.debian.org/data/main/b/btanks/0.9.8083-7/debian/patches/pow10f.patch"; 24 + sha256 = "1h45790v2dpdbccfn6lwfgl8782q54i14cz9gpipkaghcka4y0g9"; 25 + }) 26 + ]; 22 27 23 - buildPhase = '' 24 - scons prefix=$out 25 - ''; 26 - 27 - installPhase = '' 28 - scons install 29 - ''; 30 - 31 - meta = { 28 + meta = with stdenv.lib; { 32 29 homepage = https://sourceforge.net/projects/btanks/; 33 30 description = "Fast 2d tank arcade game"; 34 - license = stdenv.lib.licenses.gpl2Plus; 35 - broken = true; # 2018-09-13, no successful build since 2018-03-16 31 + license = licenses.gpl2Plus; 32 + platforms = platforms.unix; 36 33 }; 37 34 }
+1 -12
pkgs/games/dxx-rebirth/default.nix
··· 39 39 40 40 NIX_CFLAGS_COMPILE = "-Wno-format-nonliteral"; 41 41 42 - buildPhase = '' 43 - runHook preBuild 44 - 45 - scons prefix=$out 46 - 47 - runHook postBuild 48 - ''; 49 - 50 - installPhase = '' 51 - runHook preInstall 52 - 53 - scons prefix=$out install 42 + postInstall = '' 54 43 install -Dm644 ${music} $out/share/games/dxx-rebirth/d2xr-sc55-music.dxa 55 44 install -Dm644 -t $out/share/doc/dxx-rebirth *.txt 56 45
+2 -8
pkgs/games/endless-sky/default.nix
··· 22 22 SDL2 libpng libjpeg glew openal scons libmad 23 23 ]; 24 24 25 + prefixKey = "PREFIX="; 26 + 25 27 patches = [ 26 28 ./fixes.patch 27 29 ]; 28 - 29 - buildPhase = '' 30 - scons -j$NIX_BUILD_CORES PREFIX="$out" 31 - ''; 32 - 33 - installPhase = '' 34 - scons -j$NIX_BUILD_CORES install PREFIX="$out" 35 - ''; 36 30 37 31 meta = with stdenv.lib; { 38 32 description = "A sandbox-style space exploration game similar to Elite, Escape Velocity, or Star Control";
+6 -11
pkgs/games/globulation/default.nix
··· 32 32 sed -i -e "s@env = Environment()@env = Environment( ENV = os.environ )@" SConstruct 33 33 ''; 34 34 35 - buildInputs = [ libGLU_combined SDL scons SDL_ttf SDL_image zlib SDL_net speex libvorbis libogg boost fribidi bsdiff ]; 35 + nativeBuildInputs = [ scons ]; 36 + buildInputs = [ libGLU_combined SDL SDL_ttf SDL_image zlib SDL_net speex libvorbis libogg boost fribidi bsdiff ]; 36 37 37 - buildPhase = '' 38 - scons 38 + postConfigure = '' 39 + sconsFlags+=" BINDIR=$out/bin" 40 + sconsFlags+=" INSTALLDIR=$out/share/globulation2" 41 + sconsFlags+=" DATADIR=$out/share/globulation2/glob2" 39 42 ''; 40 43 41 - installPhase = '' 42 - scons install \ 43 - BINDIR=$out/bin \ 44 - INSTALLDIR=$out/share/globulation2 \ 45 - DATADIR=$out/share/globulation2/glob2 46 - ''; 47 - 48 44 meta = with stdenv.lib; { 49 45 description = "RTS without micromanagement"; 50 46 maintainers = with maintainers; [ raskin ]; ··· 53 49 }; 54 50 passthru.updateInfo.downloadPage = "http://globulation2.org/wiki/Download_and_Install"; 55 51 } 56 -
+1 -1
pkgs/games/the-powder-toy/default.nix
··· 21 21 22 22 buildInputs = [ SDL lua fftwFloat zlib bzip2 ]; 23 23 24 - buildPhase = "scons DESTDIR=$out/bin --tool='' -j$NIX_BUILD_CORES"; 24 + sconsFlags = "--tool="; 25 25 26 26 installPhase = '' 27 27 install -Dm 755 build/powder* "$out/bin/powder"
+5 -5
pkgs/misc/emulators/fceux/default.nix
··· 8 8 sha256 = "0gl2i3qdmcm7v9m5kpfz98w05d8m33990jiwka043ya7lflxvrjb"; 9 9 }; 10 10 11 - nativeBuildInputs = [ pkgconfig ]; 11 + nativeBuildInputs = [ pkgconfig scons ]; 12 12 buildInputs = [ 13 - scons zlib SDL lua5_1 13 + zlib SDL lua5_1 14 14 ]; 15 15 16 - phases = "unpackPhase buildPhase"; 16 + sconsFlags = "OPENGL=false GTK=false CREATE_AVI=false LOGO=false"; 17 + prefixKey = "--prefix="; 17 18 18 19 # sed allows scons to find libraries in nix. 19 20 # mkdir is a hack to make scons succeed. It still doesn't 20 21 # actually put the files in there due to a bug in the SConstruct file. 21 22 # OPENGL doesn't work because fceux dlopens the library. 22 - buildPhase = '' 23 + preBuild = '' 23 24 sed -e 's/env *= *Environment *.*/&; env['"'"'ENV'"'"']=os.environ;/' -i SConstruct 24 25 export CC="gcc" 25 26 export CXX="g++" 26 27 mkdir -p "$out" "$out/share/applications" "$out/share/pixmaps" 27 - scons --prefix="$out" OPENGL=false GTK=false CREATE_AVI=false LOGO=false install 28 28 ''; 29 29 30 30 meta = {
+14 -14
pkgs/servers/gpsd/default.nix
··· 44 44 45 45 # - leapfetch=no disables going online at build time to fetch leap-seconds 46 46 # info. See <gpsd-src>/build.txt for more info. 47 - buildPhase = '' 47 + preBuild = '' 48 48 patchShebangs . 49 49 sed -e "s|systemd_dir = .*|systemd_dir = '$out/lib/systemd/system'|" -i SConstruct 50 - scons \ 51 - -j $NIX_BUILD_CORES \ 52 - prefix="$out" \ 53 - leapfetch=no \ 54 - gpsd_user=${gpsdUser} \ 55 - gpsd_group=${gpsdGroup} \ 56 - systemd=yes \ 57 - udevdir="$out/lib/udev" \ 58 - python_libdir="$out/lib/${python2Packages.python.libPrefix}/site-packages" 50 + 51 + sconsFlags+=" udevdir=$out/lib/udev" 52 + sconsFlags+=" python_libdir=$out/lib/${python2Packages.python.libPrefix}/site-packages" 59 53 ''; 60 54 61 - checkPhase = '' 55 + sconsFlags = [ 56 + "leapfetch=no" 57 + "gpsd_user=${gpsdUser}" 58 + "gpsd_group=${gpsdGroup}" 59 + "systemd=yes" 60 + ]; 61 + 62 + preCheck = '' 62 63 export LD_LIBRARY_PATH="$PWD" 63 - scons check 64 64 ''; 65 65 66 66 # TODO: the udev rules file and the hotplug script need fixes to work on NixOS 67 - installPhase = '' 67 + preInstall = '' 68 68 mkdir -p "$out/lib/udev/rules.d" 69 - scons install udev-install 70 69 ''; 70 + installTargets = "install udev-install"; 71 71 72 72 postFixup = '' 73 73 wrapPythonProgramsIn $out/bin "$out $pythonPath"
+20 -24
pkgs/servers/nosql/mongodb/default.nix
··· 20 20 "yaml" 21 21 ] ++ optionals stdenv.isLinux [ "tcmalloc" ]; 22 22 23 - buildInputs = [ 24 - sasl boost gperftools pcre-cpp snappy 25 - zlib libyamlcpp sasl openssl.dev openssl.out libpcap 26 - ] ++ stdenv.lib.optionals stdenv.isDarwin [ Security ]; 27 - 28 - other-args = concatStringsSep " " ([ 29 - "--ssl" 30 - #"--rocksdb" # Don't have this packaged yet 31 - "--wiredtiger=${if stdenv.is64bit then "on" else "off"}" 32 - "--js-engine=mozjs" 33 - "--use-sasl-client" 34 - "--disable-warnings-as-errors" 35 - "VARIANT_DIR=nixos" # Needed so we don't produce argument lists that are too long for gcc / ld 36 - "CC=$CC" 37 - "CXX=$CXX" 38 - "CCFLAGS=\"${concatStringsSep " " (map (input: "-I${input}/include") buildInputs)}\"" 39 - "LINKFLAGS=\"${concatStringsSep " " (map (input: "-L${input}/lib") buildInputs)}\"" 40 - ] ++ map (lib: "--use-system-${lib}") system-libraries); 41 - 42 23 in stdenv.mkDerivation rec { 43 24 name = "mongodb-${version}"; 44 25 ··· 48 29 }; 49 30 50 31 nativeBuildInputs = [ scons ]; 51 - inherit buildInputs; 32 + buildInputs = [ 33 + sasl boost gperftools pcre-cpp snappy 34 + zlib libyamlcpp sasl openssl.dev openssl.out libpcap 35 + ] ++ stdenv.lib.optionals stdenv.isDarwin [ Security ]; 52 36 53 37 patches = 54 38 [ ··· 83 67 84 68 NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.cc.isClang "-Wno-unused-command-line-argument"; 85 69 86 - buildPhase = '' 87 - scons -j $NIX_BUILD_CORES core --release ${other-args} 70 + sconsFlags = [ 71 + "--release" 72 + "--ssl" 73 + #"--rocksdb" # Don't have this packaged yet 74 + "--wiredtiger=${if stdenv.is64bit then "on" else "off"}" 75 + "--js-engine=mozjs" 76 + "--use-sasl-client" 77 + "--disable-warnings-as-errors" 78 + "VARIANT_DIR=nixos" # Needed so we don't produce argument lists that are too long for gcc / ld 79 + ] ++ map (lib: "--use-system-${lib}") system-libraries; 80 + 81 + preBuild = '' 82 + sconsFlags+=" CC=$CC" 83 + sconsFlags+=" CXX=$CXX" 88 84 ''; 89 85 90 - installPhase = '' 86 + preInstall = '' 91 87 mkdir -p $out/lib 92 - scons -j $NIX_BUILD_CORES install --release --prefix=$out ${other-args} 93 88 ''; 89 + prefixKey = "--prefix="; 94 90 95 91 enableParallelBuilding = true; 96 92
+3 -5
pkgs/servers/rippled/default.nix
··· 15 15 sed -i -e "s@ENV = dict.*@ENV = os.environ@g" SConstruct 16 16 ''; 17 17 18 - nativeBuildInputs = [ pkgconfig ]; 19 - buildInputs = [ scons openssl protobuf boost zlib ]; 20 - 21 - buildPhase = "scons"; 18 + nativeBuildInputs = [ pkgconfig scons ]; 19 + buildInputs = [ openssl protobuf boost zlib ]; 22 20 23 - installPhase = '' 21 + postInstall = '' 24 22 mkdir -p $out/bin 25 23 cp build/rippled $out/bin/ 26 24 '';
+3 -5
pkgs/servers/sql/mariadb/default.nix
··· 233 233 234 234 buildInputs = [ asio boost check openssl scons ]; 235 235 236 - patchPhase = '' 236 + postPatch = '' 237 237 substituteInPlace SConstruct \ 238 238 --replace "boost_library_path = '''" "boost_library_path = '${boost}/lib'" 239 239 ''; ··· 243 243 export LIBPATH="${galeraLibs}/lib" 244 244 ''; 245 245 246 - buildPhase = '' 247 - scons -j$NIX_BUILD_CORES ssl=1 system_asio=1 strict_build_flags=0 248 - ''; 246 + sconsFlags = "ssl=1 system_asio=1 strict_build_flags=0"; 249 247 250 - installPhase = '' 248 + postInstall = '' 251 249 # copied with modifications from scripts/packages/freebsd.sh 252 250 GALERA_LICENSE_DIR="$share/licenses/${name}" 253 251 install -d $out/{bin,lib/galera,share/doc/galera,$GALERA_LICENSE_DIR}
+5 -7
pkgs/tools/graphics/lprof/default.nix
··· 5 5 */ 6 6 stdenv.mkDerivation { 7 7 name = "lprof-1.11.4.1"; 8 - buildInputs = [ scons qt3 lcms1 libtiff vigra ]; 8 + nativeBuildInputs = [ scons ]; 9 + buildInputs = [ qt3 lcms1 libtiff vigra ]; 9 10 10 11 hardeningDisable = [ "format" ]; 11 12 ··· 19 20 sha256 = "0q8x24fm5yyvm151xrl3l03p7hvvciqnkbviprfnvlr0lyg9wsrn"; 20 21 }; 21 22 22 - buildPhase = '' 23 - mkdir -p $out 23 + sconsFlags = "SYSLIBS=1"; 24 + preBuild = '' 24 25 export CXX=g++ 25 - 26 - scons PREFIX=$out SYSLIBS=1 install 27 26 ''; 28 - 29 - installPhase = ":"; 27 + prefixKey = "PREFIX="; 30 28 31 29 patches = [ ./lcms-1.17.patch ./keep-environment.patch ]; 32 30