From f4cc2c6fb7fa1f56eb253f43a9f0b1a3c4062861 Mon Sep 17 00:00:00 2001 From: Raymond Gauthier Date: Sat, 5 Mar 2016 19:34:08 -0500 Subject: brgenml1cupswrapper: init at 3.1.0-1 Brother generic cups wrapper over lpr driver `brgenml1lpr` init at same version. --- .../cups/drivers/brgenml1cupswrapper/default.nix | 105 +++++++++++++++++++++ pkgs/misc/cups/drivers/brgenml1lpr/default.nix | 93 ++++++++++++++++++ 2 files changed, 198 insertions(+) create mode 100644 pkgs/misc/cups/drivers/brgenml1cupswrapper/default.nix create mode 100644 pkgs/misc/cups/drivers/brgenml1lpr/default.nix (limited to 'pkgs/misc') diff --git a/pkgs/misc/cups/drivers/brgenml1cupswrapper/default.nix b/pkgs/misc/cups/drivers/brgenml1cupswrapper/default.nix new file mode 100644 index 000000000000..e4ac510dd148 --- /dev/null +++ b/pkgs/misc/cups/drivers/brgenml1cupswrapper/default.nix @@ -0,0 +1,105 @@ +{ stdenv, fetchurl, cups, perl, brgenml1lpr, debugLvl ? "0"}: + +/* + [Setup instructions](http://support.brother.com/g/s/id/linux/en/instruction_prn1a.html). + + URI example + ~ `lpd://BRW0080927AFBCE/binary_p1` + + Logging + ------- + + `/tmp/br_cupswrapper_ml1.log` when `DEBUG > 0` in `brother_lpdwrapper_BrGenML1`. + Note that when `DEBUG > 1` the wrapper stops performing its function. Better + keep `DEBUG == 1` unless this is desirable. + + Now activable through this package's `debugLvl` parameter whose value is to be + used to establish `DEBUG`. + + Issues + ------ + + 1. > Error: /tmp/brBrGenML1rc_15642 :cannot open file !! + + This is a non fatal issue. The job will still be printed. However, not sure + what kind of information could be lost. + + There should be a more elegant way to patch this. + + 2. > touch: cannot touch '/tmp/BrGenML1_latest_print_info': Permission denied + + TODO: Address. + + 3. > perl: warning: Falling back to the standard locale ("C"). + + are supported and installed on your system. + LANG = "en_US.UTF-8" + LC_ALL = (unset), + LANGUAGE = (unset), + perl: warning: Please check that your locale settings: + perl: warning: Setting locale failed. + + TODO: Address. +*/ + +stdenv.mkDerivation rec { + + name = "brgenml1cupswrapper-3.1.0-1"; + src = fetchurl { + url = "http://download.brother.com/welcome/dlf101125/${name}.i386.deb"; + sha256 = "0kd2a2waqr10kfv1s8is3nd5dlphw4d1343srdsbrlbbndja3s6r"; + }; + + unpackPhase = '' + ar x $src + tar xfvz data.tar.gz + ''; + + buildInputs = [ cups perl brgenml1lpr ]; + buildPhase = ":"; + + patchPhase = '' + WRAPPER=opt/brother/Printers/BrGenML1/cupswrapper/brother_lpdwrapper_BrGenML1 + PAPER_CFG=opt/brother/Printers/BrGenML1/cupswrapper/paperconfigml1 + + substituteInPlace $WRAPPER \ + --replace "basedir =~" "basedir = \"${brgenml1lpr}/opt/brother/Printers/BrGenML1\"; #" \ + --replace "PRINTER =~" "PRINTER = \"BrGenML1\"; #" \ + --replace "\$DEBUG=0;" "\$DEBUG=${debugLvl};" + + # Fixing issue #2. + substituteInPlace $WRAPPER \ + --replace "\`cp " "\`cp -p " \ + --replace "\$TEMPRC\`" "\$TEMPRC; chmod a+rw \$TEMPRC\`" \ + --replace "\`mv " "\`cp -p " + + # This config script make this assumption that the *.ppd are found in a global location `/etc/cups/ppd`. + substituteInPlace $PAPER_CFG \ + --replace "/etc/cups/ppd" "$out/share/cups/model" + ''; + + installPhase = '' + CUPSFILTER=$out/lib/cups/filter + CUPSPPD=$out/share/cups/model + + CUPSWRAPPER=opt/brother/Printers/BrGenML1/cupswrapper + mkdir -p $out/$CUPSWRAPPER + cp -rp $CUPSWRAPPER/* $out/$CUPSWRAPPER + + mkdir -p $CUPSFILTER + ln -s $out/$CUPSWRAPPER/brother_lpdwrapper_BrGenML1 $CUPSFILTER + + mkdir -p $CUPSPPD + ln -s $out/$CUPSWRAPPER/brother-BrGenML1-cups-en.ppd $CUPSPPD + ''; + + dontPatchELF = true; + + meta = { + description = "Brother BrGenML1 CUPS wrapper driver"; + homepage = http://www.brother.com; + platforms = stdenv.lib.platforms.linux; + license = stdenv.lib.licenses.gpl2Plus; + maintainers = with stdenv.lib.maintainers; [ jraygauthier ]; + }; +} diff --git a/pkgs/misc/cups/drivers/brgenml1lpr/default.nix b/pkgs/misc/cups/drivers/brgenml1lpr/default.nix new file mode 100644 index 000000000000..6dc2408ec88a --- /dev/null +++ b/pkgs/misc/cups/drivers/brgenml1lpr/default.nix @@ -0,0 +1,93 @@ +{ stdenv, fetchurl, cups, perl, glibc, ghostscript, which, makeWrapper}: + +/* + [Setup instructions](http://support.brother.com/g/s/id/linux/en/instruction_prn1a.html). + + URI example + ~ `lpd://BRW0080927AFBCE/binary_p1` + + Logging + ------- + + `/tmp/br_lpdfilter_ml1.log` when `$ENV{LPD_DEBUG} > 0` in `filter_BrGenML1` + which is activated automatically when `DEBUG > 0` in `brother_lpdwrapper_BrGenML1` + from the cups wrapper. + + Issues + ------ + + - filter_BrGenML1 ln 196 `my $GHOST_SCRIPT=`which gs`;` + + `GHOST_SCRIPT` is empty resulting in an empty `/tmp/br_lpdfilter_ml1_gsout.dat` file. + See `/tmp/br_lpdfilter_ml1.log` for the executed command. + + Notes + ----- + + - The `setupPrintcap` has totally no use in our context. +*/ + +let + myPatchElf = file: with stdenv.lib; '' + patchelf --set-interpreter \ + ${stdenv.glibc}/lib/ld-linux${optionalString stdenv.is64bit "-x86-64"}.so.2 \ + ${file} + ''; +in +stdenv.mkDerivation rec { + + name = "brgenml1lpr-3.1.0-1"; + src = fetchurl { + url = "http://download.brother.com/welcome/dlf101123/${name}.i386.deb"; + sha256 = "0zdvjnrjrz9sba0k525linxp55lr4cyivfhqbkq1c11br2nvy09f"; + }; + + unpackPhase = '' + ar x $src + tar xfvz data.tar.gz + ''; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ cups perl glibc ghostscript which ]; + + buildPhase = ":"; + + patchPhase = '' + INFDIR=opt/brother/Printers/BrGenML1/inf + LPDDIR=opt/brother/Printers/BrGenML1/lpd + + # Setup max debug log by default. + substituteInPlace $LPDDIR/filter_BrGenML1 \ + --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$out/opt/brother/Printers/BrGenML1\"; #" \ + --replace "PRINTER =~" "PRINTER = \"BrGenML1\"; #" + + ${myPatchElf "$INFDIR/braddprinter"} + ${myPatchElf "$LPDDIR/brprintconflsr3"} + ${myPatchElf "$LPDDIR/rawtobr3"} + ''; + + installPhase = '' + INFDIR=opt/brother/Printers/BrGenML1/inf + LPDDIR=opt/brother/Printers/BrGenML1/lpd + + mkdir -p $out/$INFDIR + cp -rp $INFDIR/* $out/$INFDIR + mkdir -p $out/$LPDDIR + cp -rp $LPDDIR/* $out/$LPDDIR + + wrapProgram $out/$LPDDIR/filter_BrGenML1 \ + --prefix PATH ":" "${ghostscript}/bin" \ + --prefix PATH ":" "${which}/bin" + ''; + + dontPatchELF = true; + + + meta = { + description = "Brother BrGenML1 LPR driver"; + homepage = http://www.brother.com; + platforms = stdenv.lib.platforms.linux; + license = stdenv.lib.licenses.gpl2Plus; + maintainers = with stdenv.lib.maintainers; [ jraygauthier ]; + }; +} -- cgit 1.4.1 From 6c935046a75016e9f1e6b142ce23fa53cb5e31d4 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 18 Mar 2016 11:30:29 +0100 Subject: splix: revert of revert of "2.0.0 -> svn-r315 version update" This reverts commit e338d6a0fc1293c1d5b63d9e38e690526fc7d1b1. I originally reverted the update because it broke my Samsung printer. Now, it turns out that this issue can be fixed by deleting and then re-creating the printer in CUPS to update the driver. It's possible that Gutenprints 'cups-genppdupdates' could remedy the situation as well, but I had no chance to verify that since I don't use Gutenprint. Closes https://github.com/NixOS/nixpkgs/issues/13734. --- pkgs/misc/cups/drivers/splix/default.nix | 20 ++++++++++---------- pkgs/misc/cups/drivers/splix/splix-2.0.0-gcc45.patch | 18 ------------------ 2 files changed, 10 insertions(+), 28 deletions(-) delete mode 100644 pkgs/misc/cups/drivers/splix/splix-2.0.0-gcc45.patch (limited to 'pkgs/misc') diff --git a/pkgs/misc/cups/drivers/splix/default.nix b/pkgs/misc/cups/drivers/splix/default.nix index 532ef2a45d5d..9a924e044d7f 100644 --- a/pkgs/misc/cups/drivers/splix/default.nix +++ b/pkgs/misc/cups/drivers/splix/default.nix @@ -1,16 +1,16 @@ -{stdenv, fetchurl, cups, zlib}: - +{ stdenv, fetchsvn, fetchurl, cups, zlib }: +let rev = "315"; in stdenv.mkDerivation rec { - name = "splix-2.0.0"; - - src = fetchurl { - url = "mirror://sourceforge/splix/${name}.tar.bz2"; - sha256 = "0bwivrwwvh6hzvnycpzqs7a0capgycahc4s3v9ihx552fgy07xwp"; + name = "splix-svn-${rev}"; + src = fetchsvn { + # We build this from svn, because splix hasn't been in released in several years + # although the community has been adding some new printer models. + url = "svn://svn.code.sf.net/p/splix/code/splix"; + rev = "r${rev}"; + sha256 = "16wbm4xnz35ca3mw2iggf5f4jaxpyna718ia190ka6y4ah932jxl"; }; - patches = [ ./splix-2.0.0-gcc45.patch ]; - - preBuild='' + preBuild = '' makeFlags="V=1 DISABLE_JBIG=1 CUPSFILTER=$out/lib/cups/filter CUPSPPD=$out/share/cups/model" ''; diff --git a/pkgs/misc/cups/drivers/splix/splix-2.0.0-gcc45.patch b/pkgs/misc/cups/drivers/splix/splix-2.0.0-gcc45.patch deleted file mode 100644 index 5ccdcb2514c5..000000000000 --- a/pkgs/misc/cups/drivers/splix/splix-2.0.0-gcc45.patch +++ /dev/null @@ -1,18 +0,0 @@ -Fixing build with gcc 4.5 - -http://bugs.gentoo.org/show_bug.cgi?id=318581 - -downloaded from -http://gentoo-overlays.zugaina.org/gentoo/portage/net-print/splix/files/splix-2.0.0-gcc45.patch - ---- splix-old/src/ppdfile.cpp -+++ splix-new/src/ppdfile.cpp -@@ -282,7 +282,7 @@ - * Opérateur d'assignation - * Assignment operator - */ --void PPDFile::Value::operator = (const PPDFile::Value::Value &val) -+void PPDFile::Value::operator = (const PPDFile::Value &val) - { - if (_preformatted) - delete[] _preformatted; -- cgit 1.4.1 From e6b85e6b787f8e253e54698d65fd8184e543bc32 Mon Sep 17 00:00:00 2001 From: Yochai Date: Fri, 18 Mar 2016 11:22:48 +0200 Subject: mfcj470dw: fix missing file error --- pkgs/misc/cups/drivers/mfcj470dw/default.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'pkgs/misc') diff --git a/pkgs/misc/cups/drivers/mfcj470dw/default.nix b/pkgs/misc/cups/drivers/mfcj470dw/default.nix index d1a1b239371a..d6ce3fbcdc64 100644 --- a/pkgs/misc/cups/drivers/mfcj470dw/default.nix +++ b/pkgs/misc/cups/drivers/mfcj470dw/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cups, dpkg, ghostscript, patchelf, bash, file }: +{ stdenv, fetchurl, cups, dpkg, ghostscript, patchelf, a2ps, coreutils, gnused, gawk, file }: stdenv.mkDerivation rec { name = "mfcj470dw-cupswrapper-${version}"; @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { }) ]; - buildInputs = [ dpkg cups patchelf bash ]; + buildInputs = [ cups ghostscript dpkg a2ps ]; unpackPhase = "true"; @@ -29,9 +29,20 @@ stdenv.mkDerivation rec { substituteInPlace $out/opt/brother/Printers/mfcj470dw/lpd/filtermfcj470dw \ --replace /opt "$out/opt" \ - --replace file "/run/current-system/sw/bin/file" + --replace file "${file}/bin/file" \ + --replace sed "${gnused}/bin/sed" \ + --replace mktemp "${coreutils}/bin/mktemp" \ + --replace cat "${coreutils}/bin/cat" \ + --replace rm "${coreutils}/bin/rm" sed -i '/GHOST_SCRIPT=/c\GHOST_SCRIPT=gs' $out/opt/brother/Printers/mfcj470dw/lpd/psconvertij2 + substituteInPlace $out/opt/brother/Printers/mfcj470dw/lpd/psconvertij2 \ + --replace awk "${gawk}/bin/awk" \ + --replace cat "${coreutils}/bin/cat" \ + --replace mktemp "${coreutils}/bin/mktemp" \ + --replace sed "${gnused}/bin/sed" \ + --replace expr "${coreutils}/bin/expr" \ + --replace rm "${coreutils}/bin/rm" patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $out/opt/brother/Printers/mfcj470dw/lpd/brmfcj470dwfilter patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $out/opt/brother/Printers/mfcj470dw/cupswrapper/brcupsconfpt1 -- cgit 1.4.1 From 51eb1dce81fdc8d61fae8afab082367b0bbb02ef Mon Sep 17 00:00:00 2001 From: Brandon Kase Date: Sun, 20 Mar 2016 02:29:34 -0700 Subject: vim-plugins: add airline-themes --- pkgs/misc/vim-plugins/default.nix | 10 ++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 2 files changed, 11 insertions(+) (limited to 'pkgs/misc') diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix index f1e64a8e6f3c..b2ce4d39b808 100644 --- a/pkgs/misc/vim-plugins/default.nix +++ b/pkgs/misc/vim-plugins/default.nix @@ -1451,6 +1451,16 @@ rec { }; + vim-airline-themes = buildVimPluginFrom2Nix { # created by nix#NixDerivation + name = "vim-airline-themes-2016-02-24"; + src = fetchgit { + url = "git://github.com/vim-airline/vim-airline-themes"; + rev = "13bad30d4ee3892cae755c83433ee85fbc96d028"; + sha256 = "0w36ani4r2v58pd0fcqv12j0hjd97g2q78zici1a72njvwp9qhgj"; + }; + dependencies = [ "vim-airline" ]; + }; + vim-coffee-script = buildVimPluginFrom2Nix { # created by nix#NixDerivation name = "vim-coffee-script-2015-04-20"; src = fetchgit { diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 82b59f1ebaa8..88e9bbb95944 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -112,6 +112,7 @@ "vim-addon-toggle-buffer" "vim-addon-xdebug" "vim-airline" +"vim-airline-themes" "vim-coffee-script" "vim-easy-align" "vim-gista" -- cgit 1.4.1 From 6386d68e9df785a503d4efe78f069f3c64dfdbd0 Mon Sep 17 00:00:00 2001 From: Kamil Chmielewski Date: Sat, 19 Mar 2016 11:11:22 +0100 Subject: vimPlugins: youcompleteme FIX #14006 No rule to make target 'ycm_support_libs' https://github.com/Valloric/ycmd/commit/599de71575d542d4fc5c33344c65b3931e4d7ed2#diff-6725b893dfc969abac4f4ee39a3a317f --- pkgs/misc/vim-plugins/default.nix | 8 ++++---- pkgs/misc/vim-plugins/vim2nix/additional-nix-code/youcompleteme | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'pkgs/misc') diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix index f1e64a8e6f3c..c1c0c4b1bd69 100644 --- a/pkgs/misc/vim-plugins/default.nix +++ b/pkgs/misc/vim-plugins/default.nix @@ -883,11 +883,11 @@ rec { }; youcompleteme = buildVimPluginFrom2Nix { # created by nix#NixDerivation - name = "youcompleteme-2016-03-08"; + name = "youcompleteme-2016-03-10"; src = fetchgit { url = "git://github.com/valloric/youcompleteme"; - rev = "381b2132719a959f41e57ec0e6396fc1c3b6daf4"; - sha256 = "1gski3s1960pmxisyq85awda0a3kb22ji9y76f67k1a4smy5q9xa"; + rev = "f44435b88ec98156d17869aa67ad15f38cfecbf3"; + sha256 = "1y50ilyfwj6rvpvg50iq418maxvsfs54i202v7x0lfs5hmvcb4hi"; }; dependencies = []; buildInputs = [ @@ -904,7 +904,7 @@ rec { mkdir build pushd build cmake -G "Unix Makefiles" . ../third_party/ycmd/cpp -DPYTHON_LIBRARIES:PATH=${python}/lib/libpython2.7.so -DPYTHON_INCLUDE_DIR:PATH=${python}/include/python2.7 -DUSE_CLANG_COMPLETER=ON -DUSE_SYSTEM_LIBCLANG=ON - make ycm_support_libs -j''${NIX_BUILD_CORES} -l''${NIX_BUILD_CORES}} + make ycm_core -j''${NIX_BUILD_CORES} -l''${NIX_BUILD_CORES}} ${python}/bin/python ../third_party/ycmd/build.py --gocode-completer --clang-completer --system-libclang popd ''; diff --git a/pkgs/misc/vim-plugins/vim2nix/additional-nix-code/youcompleteme b/pkgs/misc/vim-plugins/vim2nix/additional-nix-code/youcompleteme index 48f5322267b8..cb90adfdc397 100644 --- a/pkgs/misc/vim-plugins/vim2nix/additional-nix-code/youcompleteme +++ b/pkgs/misc/vim-plugins/vim2nix/additional-nix-code/youcompleteme @@ -12,7 +12,7 @@ mkdir build pushd build cmake -G "Unix Makefiles" . ../third_party/ycmd/cpp -DPYTHON_LIBRARIES:PATH=${python}/lib/libpython2.7.so -DPYTHON_INCLUDE_DIR:PATH=${python}/include/python2.7 -DUSE_CLANG_COMPLETER=ON -DUSE_SYSTEM_LIBCLANG=ON - make ycm_support_libs -j''${NIX_BUILD_CORES} -l''${NIX_BUILD_CORES}} + make ycm_core -j''${NIX_BUILD_CORES} -l''${NIX_BUILD_CORES}} ${python}/bin/python ../third_party/ycmd/build.py --gocode-completer --clang-completer --system-libclang popd ''; -- cgit 1.4.1 From ef2f2de53a4737febdd85ccd9ebcab926d2a4830 Mon Sep 17 00:00:00 2001 From: Sheena Artrip Date: Tue, 22 Mar 2016 01:35:20 -0400 Subject: mednaffe: init at 0.8 --- pkgs/misc/emulators/mednaffe/default.nix | 28 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/misc/emulators/mednaffe/default.nix (limited to 'pkgs/misc') diff --git a/pkgs/misc/emulators/mednaffe/default.nix b/pkgs/misc/emulators/mednaffe/default.nix new file mode 100644 index 000000000000..7777e73d3375 --- /dev/null +++ b/pkgs/misc/emulators/mednaffe/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchFromGitHub, pkgconfig, gtk2, mednafen }: + +stdenv.mkDerivation rec { + + version = "0.8"; + name = "mednaffe-${version}"; + + src = fetchFromGitHub { + repo = "mednaffe"; + owner = "AmatCoder"; + rev = "v${version}"; + sha256 = "1j4py4ih14fa6dv0hka03rs4mq19ir83qkbxsz3695a4phmip0jr"; + }; + + prePatch = '' + substituteInPlace src/mednaffe.c --replace "binpath = NULL" "binpath = \"${mednafen}/bin/mednafen\"" + ''; + + buildInputs = [ pkgconfig gtk2 mednafen ]; + + meta = with stdenv.lib; { + description = "A GTK based frontend for mednafen"; + homepage = https://github.com/AmatCoder/mednaffe; + license = licenses.gpl3; + maintainers = [ maintainers.sheenobu ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 486583a2a1a6..c2a68176ebb7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2428,6 +2428,8 @@ let mednafen-server = callPackage ../misc/emulators/mednafen/server.nix { }; + mednaffe = callPackage ../misc/emulators/mednaffe/default.nix { }; + megacli = callPackage ../tools/misc/megacli { }; megatools = callPackage ../tools/networking/megatools { }; -- cgit 1.4.1 From 0c6db0ca48612f18e5c2b744dfa385ba8eecc950 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Tue, 15 Mar 2016 19:35:07 +0300 Subject: cc-wrapper: add option to skip flags for native optimizations --- pkgs/build-support/cc-wrapper/cc-wrapper.sh | 14 ++++++++++++++ pkgs/build-support/cc-wrapper/gnat-wrapper.sh | 14 ++++++++++++++ pkgs/development/libraries/crypto++/default.nix | 1 - pkgs/misc/emulators/higan/0001-change-flags.diff | 9 --------- pkgs/stdenv/darwin/default.nix | 1 + pkgs/stdenv/linux/default.nix | 1 + pkgs/stdenv/native/default.nix | 1 + pkgs/stdenv/nix/default.nix | 1 + pkgs/tools/networking/pingtcp/default.nix | 5 ----- pkgs/tools/security/crackxls/default.nix | 6 ------ 10 files changed, 32 insertions(+), 21 deletions(-) (limited to 'pkgs/misc') diff --git a/pkgs/build-support/cc-wrapper/cc-wrapper.sh b/pkgs/build-support/cc-wrapper/cc-wrapper.sh index 41567fde2694..3b6f2acfee8b 100644 --- a/pkgs/build-support/cc-wrapper/cc-wrapper.sh +++ b/pkgs/build-support/cc-wrapper/cc-wrapper.sh @@ -91,6 +91,20 @@ if [ "$NIX_ENFORCE_PURITY" = 1 -a -n "$NIX_STORE" ]; then params=("${rest[@]}") fi + +# Clear march/mtune=native -- they bring impurity. +if [ "$NIX_ENFORCE_NO_NATIVE" = 1 ]; then + rest=() + for i in "${params[@]}"; do + if [[ "$i" = -m*=native ]]; then + skip $i + else + rest=("${rest[@]}" "$i") + fi + done + params=("${rest[@]}") +fi + if [[ "$isCpp" = 1 ]]; then NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE ${NIX_CXXSTDLIB_COMPILE-@default_cxx_stdlib_compile@}" NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK $NIX_CXXSTDLIB_LINK" diff --git a/pkgs/build-support/cc-wrapper/gnat-wrapper.sh b/pkgs/build-support/cc-wrapper/gnat-wrapper.sh index ae46b40ac631..4b3ba386917c 100644 --- a/pkgs/build-support/cc-wrapper/gnat-wrapper.sh +++ b/pkgs/build-support/cc-wrapper/gnat-wrapper.sh @@ -70,6 +70,20 @@ if [ "$NIX_ENFORCE_PURITY" = 1 -a -n "$NIX_STORE" ]; then fi +# Clear march/mtune=native -- they bring impurity. +if [ "$NIX_ENFORCE_NO_NATIVE" = 1 ]; then + rest=() + for i in "${params[@]}"; do + if [[ "$i" = -m*=native ]]; then + skip $i + else + rest=("${rest[@]}" "$i") + fi + done + params=("${rest[@]}") +fi + + # Add the flags for the GNAT compiler proper. extraAfter=($NIX_GNATFLAGS_COMPILE) extraBefore=() diff --git a/pkgs/development/libraries/crypto++/default.nix b/pkgs/development/libraries/crypto++/default.nix index 788d488659af..940af8c44e91 100644 --- a/pkgs/development/libraries/crypto++/default.nix +++ b/pkgs/development/libraries/crypto++/default.nix @@ -25,7 +25,6 @@ stdenv.mkDerivation rec { '' sed -i GNUmakefile \ -e 's|-march=native|${marchflags} -fPIC|g' \ - -e 's|-mtune=native||g' \ -e '/^CXXFLAGS =/s|-g ||' ''; diff --git a/pkgs/misc/emulators/higan/0001-change-flags.diff b/pkgs/misc/emulators/higan/0001-change-flags.diff index 78f4a248c5fd..9d7608b93281 100644 --- a/pkgs/misc/emulators/higan/0001-change-flags.diff +++ b/pkgs/misc/emulators/higan/0001-change-flags.diff @@ -11,15 +11,6 @@ diff -rupN higan_v095-source.orig/GNUmakefile higan_v095-source/GNUmakefile objects := libco # profile-guided optimization mode -@@ -43,7 +44,7 @@ ifeq ($(platform),windows) - else ifeq ($(platform),macosx) - flags += -march=native - else ifeq ($(platform),linux) -- flags += -march=native -fopenmp -+ flags += -fopenmp - link += -fopenmp - link += -Wl,-export-dynamic - link += -lX11 -lXext -ldl diff -rupN higan_v095-source.orig/icarus/GNUmakefile higan_v095-source/icarus/GNUmakefile --- higan_v095-source.orig/icarus/GNUmakefile 2015-11-04 10:28:26.186486119 +0100 +++ higan_v095-source/icarus/GNUmakefile 2015-11-04 10:28:48.755059317 +0100 diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index e73e39692533..6f82fceae529 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -26,6 +26,7 @@ in rec { commonPreHook = '' export NIX_ENFORCE_PURITY="''${NIX_ENFORCE_PURITY-1}" + export NIX_ENFORCE_NO_NATIVE="''${NIX_ENFORCE_NO_NATIVE-1}" export NIX_IGNORE_LD_THROUGH_GCC=1 stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" export MACOSX_DEPLOYMENT_TARGET=10.7 diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 1841c3a06931..24d8ccec61a6 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -23,6 +23,7 @@ rec { commonPreHook = '' export NIX_ENFORCE_PURITY="''${NIX_ENFORCE_PURITY-1}" + export NIX_ENFORCE_NO_NATIVE="''${NIX_ENFORCE_NO_NATIVE-1}" ${if system == "x86_64-linux" then "NIX_LIB64_IN_SELF_RPATH=1" else ""} ${if system == "mips64el-linux" then "NIX_LIB32_IN_SELF_RPATH=1" else ""} ''; diff --git a/pkgs/stdenv/native/default.nix b/pkgs/stdenv/native/default.nix index bd90d580d3f5..291ef5a5079f 100644 --- a/pkgs/stdenv/native/default.nix +++ b/pkgs/stdenv/native/default.nix @@ -16,6 +16,7 @@ rec { # Disable purity tests; it's allowed (even needed) to link to # libraries outside the Nix store (like the C library). export NIX_ENFORCE_PURITY= + export NIX_ENFORCE_NO_NATIVE="''${NIX_ENFORCE_NO_NATIVE-1}" ''; prehookFreeBSD = '' diff --git a/pkgs/stdenv/nix/default.nix b/pkgs/stdenv/nix/default.nix index 0e3434be0175..e58972e5c8a6 100644 --- a/pkgs/stdenv/nix/default.nix +++ b/pkgs/stdenv/nix/default.nix @@ -6,6 +6,7 @@ import ../generic rec { preHook = '' export NIX_ENFORCE_PURITY="''${NIX_ENFORCE_PURITY-1}" + export NIX_ENFORCE_NO_NATIVE="''${NIX_ENFORCE_NO_NATIVE-1}" export NIX_IGNORE_LD_THROUGH_GCC=1 ''; diff --git a/pkgs/tools/networking/pingtcp/default.nix b/pkgs/tools/networking/pingtcp/default.nix index 4d99eaaeff66..a1b1f549ee4a 100644 --- a/pkgs/tools/networking/pingtcp/default.nix +++ b/pkgs/tools/networking/pingtcp/default.nix @@ -13,11 +13,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - postPatch = '' - substituteInPlace {.,pfcquirks}/CMakeLists.txt \ - --replace "-march=native" "" - ''; - enableParallelBuilding = true; doCheck = false; diff --git a/pkgs/tools/security/crackxls/default.nix b/pkgs/tools/security/crackxls/default.nix index c8ea45a39dbe..f4c92ac701f4 100644 --- a/pkgs/tools/security/crackxls/default.nix +++ b/pkgs/tools/security/crackxls/default.nix @@ -13,12 +13,6 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig autoconf automake openssl libgsf gmp ]; - patchPhase = '' - substituteInPlace Makefile.in \ - --replace '-march=native' "" \ - --replace '-mtune=native' "" - ''; - installPhase = '' mkdir -p $out/bin -- cgit 1.4.1 From 1a97cfb91f9f76f463bc0b9bc1a08850e737201a Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Mon, 28 Mar 2016 01:00:27 +0200 Subject: lilypond: set some HOME during the build for Metafont --- pkgs/misc/lilypond/default.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkgs/misc') diff --git a/pkgs/misc/lilypond/default.nix b/pkgs/misc/lilypond/default.nix index 8b2be0914e3e..731dc263a022 100644 --- a/pkgs/misc/lilypond/default.nix +++ b/pkgs/misc/lilypond/default.nix @@ -30,6 +30,8 @@ stdenv.mkDerivation rec{ # confused the version detection… sed -re 's%("[$]exe" --version .*)([|\\] *$)%\1 | sed -re "s@/nix/store/[a-z0-9]{32}-@@" \2%' \ -i configure + + export HOME=$TMPDIR/home ''; postInstall = '' -- cgit 1.4.1