Commit Graph
100 Commits
Author SHA1 Message Date
Matthew Bauer c2039e1901 mesa: make more things optional (#87438)
osmesa & gallium-nine are not needed for all systems. So this adds a
flag to disable them if you don’t want them.
2020-05-29 22:29:32 -05:00
Matthew Bauer 01377fc6ef Merge pull request #87435 from matthewbauer/strip-more-in-cross
treewide: strip more things in cross
2020-05-29 22:28:04 -05:00
Matthew Bauer 7e571eb994 Merge pull request #88988 from tobim/optimize-cross-libstdc++
gcc: optimize cross-compiled libraries
2020-05-27 10:12:35 -05:00
Matthew Bauer 673827fd31 Merge pull request #88984 from matthewbauer/gfortran-no-pkgsTargetTarget
openmpi: use pkgsHostTarget for gfortran
2020-05-27 10:11:42 -05:00
Matthew Bauer c60144d4c0 openmpi: use pkgsHostTarget for gfortran
This is very confusing. “stdenv” is created from the parent stage so
pkgsTargetTarget.stdenv.cc is a compiler that runs /on/ host platform
and creates binaries for target platform. gfortran on the other hand
is not special cased like stdenv, so the equivalent to
pkgsTargetTarget.stdenv.cc is pkgsHostTarget.gfortran.

I’ve rewritten this to be a little less confusing, “pkgsHostTarget” is
equivalent to “pkgs” so it is unneeded. All that is left is
“pkgsTargetTarget.stdenv” which is equivalent to
“targetPackages.stdenv”.

Fixes #88951

/cc @markuskowa @ericson2314
2020-05-26 16:44:50 -05:00
Matthew Bauer faa7ae8643 nix-bundle: 0.3 -> 0.4 2020-05-24 09:27:47 +02:00
Matthew Bauer 64f8baf108 Merge pull request #71498 from chessai/libxsmm-add
libxsmm: init at 1.13
2020-05-23 16:32:39 -05:00
Matthew Bauer c74a9cd3e2 Merge pull request #69144 from SFrijters/gdc
gdc: init at 9.3.0
2020-05-23 16:30:47 -05:00
Matthew Bauer bbf07902e5 Merge pull request #87528 from ggreif/ggreif/compiler-rt
llvm{6..10}/compiler-rt: fix compilation on Darwin
2020-05-20 14:05:10 -05:00
Matthew Bauer 69232bc088 Merge pull request #87899 from bhipple/feature/tensorflow-srcs
tensorflow: passthru deps from bazel build
2020-05-19 21:31:34 -05:00
Matthew Bauer fb35227b8c Merge pull request #87583 from Gaelan/single-llvm
stdenv-darwin: now with 50% less LLVM!
2020-05-15 18:56:17 -05:00
Matthew Bauer 233e60ca24 Merge pull request #87691 from matthewbauer/linux-rpi3-arm32
linux-rpi: use bcm2709 on arm32 rpi3
2020-05-13 10:35:21 -05:00
Matthew Bauer d38bad590e Merge pull request #83180 from matthewbauer/only-add-ldflags-for-macos
bintools: only add macos flags when targeting macOS
2020-05-13 10:34:40 -05:00
Matthew Bauer 34aff7f697 treewide: strip more things in cross
Stripping reduces closure sizes.
2020-05-12 14:31:03 -05:00
Matthew Bauer c78ad0f7f8 linux-rpi: use bcm2709 on arm32 rpi3
“bcmrpi3_defconfig” isn’t provided for arm32, so we need to use
bcm2709_config. When on arm64, we can still use bcmrpi3_defconfig
2020-05-12 13:07:00 -05:00
Matthew Bauer c89072465c Merge pull request #87637 from cole-h/gcc10
gcc10: fix eval due to missing `langJit`
2020-05-11 19:42:33 -05:00
Matthew Bauer 43545032af Merge pull request #87314 from matthewbauer/bazel-flat
build-bazel-package: switch hash mode to “flat”
2020-05-11 15:27:48 -05:00
Matthew Bauer fe48f63c3c build-bazel-package: Add hash change to changelog 2020-05-11 13:19:52 -05:00
Matthew Bauer 028d322854 Merge pull request #87419 from thefloweringash/compiler-rt-armv7l
compiler-rt: fix build on armv7l
2020-05-11 10:51:50 -05:00
Matthew Bauer b907387ffe Merge pull request #87212 from matthewbauer/dont-include-gdk-pixbuf-module-file
nixos/gdk-pixbuf.nix: don’t set GDK_PIXBUF_MODULE_FILE in cross
2020-05-09 14:06:48 -05:00
Matthew Bauer 1e19cc37bd build-bazel-package: pass proxy env vars 2020-05-09 13:35:47 -05:00
Matthew Bauer 2a8d05627b build-bazel-package: switch hash mode to “flat”
flat hashes can be substituted through hashed-mirrors, while recursive
hashes can’t. This is especially important for Bazel since the bazel
fetch dependencies can come from multiple different methods (git,
http, ftp, etc.). To do this, we create tar archives from the
output/external directory, which is then extracted to build. All of
the Bazel hashes are all updated.
2020-05-09 13:33:26 -05:00
Matthew Bauer b57016c8c8 Merge pull request #87157 from matthewbauer/libgccjit
Add libgccjit
2020-05-09 13:17:04 -05:00
Matthew Bauer 8bdb2a058e numpy: set lapack, blas sections
When using netlib lapack/blas, the section name doesn’t match what
numpy expects. So we need to add extra sections for both so that the
right directory is found. The original “blas.implementation” section
may not actually be still required, but it is still a good idea so
that numpy know whether to apply any blas-implementation specific
quirks.

Fixes #86613
2020-05-08 06:47:30 +02:00
Matthew Bauer 807e45f643 jitsi: use X-Internet for desktop categories
avoids error from incorrect category name.
2020-05-07 15:17:09 -05:00
Matthew Bauer c33e8c4986 nixos/gdk-pixbuf.nix: don’t set GDK_PIXBUF_MODULE_FILE in cross
From 6c5983a291, this should not be
necessary for gdk-pixbuf to work correctly.
2020-05-07 14:39:42 -05:00
Matthew Bauer fe1955588a gcc: add langJit option for gcclangjit
This option can be used to set the “jit” language which enable the
libgccjit functionality. Also adds a “libgccjit” attr which is gcc
built with just jit enabled.
2020-05-06 23:12:17 -05:00
Matthew Bauer 9c4fbf9cb1 gcc: don’t require "lib" output
libgccjit is a library but is used as a compiler. So it references a
bunch of compiler things in $out. To avoid a cycle, we need to put
everything in $out, so referenced to $lib need to be replaced with
${!outputLib}.
2020-05-05 22:23:26 -05:00
Matthew Bauer 764c8203b8 nixos/systemd.nix: don’t require online for multi-user.target
Not all systems need to be online to boot up. So, don’t pull
network-online.target into multi-user.target. Services that need
online network can still require it.

This increases my boot time from ~9s to ~5s.
2020-04-28 18:59:48 -05:00
Matthew Bauer b3f812688c kde/{kate,konqueror,okular}: decrease text mimetype preference
These .desktop files set InitialPreference>1 which will override other
associations even the .desktop appears first in XDG_DATA_DIRS. This
applies to:

- org.kde.kate.desktop
- org.kde.kwrite.desktop
- kfmclient_html.desktop
- okularApplication_txt.desktop

Fixes #86137
2020-04-27 23:00:25 -05:00
Matthew Bauer 712026ead1 Merge pull request #85246 from matthewbauer/use-system-libraries-for-grpcio
python.pkgs.grpcio: use system openssl, zlib, and c-ares
2020-04-27 14:46:03 -05:00
Matthew Bauer 537f10f044 Merge pull request #85945 from matthewbauer/compiler-rt-support-x86_32
llvm/compiler-rt.nix: add i{4,5,6}86 to X86 architecture
2020-04-27 14:45:39 -05:00
Matthew Bauer ff642c5694 llvm/compiler-rt.nix: add i{4,5,6}86 to X86 architecture
Fixes #85622
2020-04-24 10:22:21 -05:00
Matthew Bauer 4238b2b943 doc/overlays.xml: fix missing documentation for blas/lapack
This adds some more information to the documentation as well as
addressing review from https://github.com/NixOS/nixpkgs/pull/85636.
2020-04-22 12:43:14 -05:00
Matthew Bauer 3d18975478 python.pkgs.scipy: set SCIPY_USE_G77_ABI_WRAPPER=1
To avoid segmentation fault on MKL, we need to use the CBLAS ABI.
Normally, scipy will autodetect this, but here we don’t link using the
‘libmkl_rt.so’ name. So we need to manually set this.

See https://github.com/scipy/scipy/blob/50012918db47f0ec3418dd53f0277daa589f82e3/doc/source/building/linux.rst#fortran-abi-mismatch
2020-04-22 12:38:28 -05:00
Matthew Bauer 5a500ff0ba blas,lapack: use correct name for library
To match the soname, we need to use libblas.so.3, liblapack.so.3.
2020-04-22 12:37:04 -05:00
Matthew Bauer 3c41d61514 doc/overlays.xml: update documentation for BLAS/LAPACK
This expands the documentation and explains how to assert LP64.
2020-04-21 11:03:10 -05:00
Matthew Bauer 8f58fa044d blas,lapack: symlink headers when using mkl
Some of these are necessary for things like python.pkgs.numexpr
2020-04-21 00:30:44 -05:00
Matthew Bauer 0caa375b4c blas,lapack: provide symlink for libmkl_rt.so
This is needed for numpy to detect mkl correctly.
2020-04-20 23:47:10 -05:00
Matthew Bauer a6a502fca0 magma: remove mklSupport flag
This now relies on the "blas" and "lapack" packages.
2020-04-20 16:02:57 -05:00
Matthew Bauer ff2f2644f8 blas,lapack: use isILP64 instead of is64bit
This is a better name since we have multiple 64-bit things that could
be referred to.

LP64  : integer=32, long=64, pointer=64
ILP64 : integer=64, long=64, pointer=64
2020-04-20 16:02:43 -05:00
Matthew Bauer f86d582ea7 doc/overlays.xml: add information on BLAS/LAPACK switching 2020-04-20 15:50:28 -05:00
Matthew Bauer 3c9c894f83 blas,lapack: don’t patchelf
We have some unused RPATHs we don’t want shrunk. These are used in MKL
to dlopen based on architecture.
2020-04-20 15:50:28 -05:00
Matthew Bauer 015f46beba numpy: set lapack,blas library names correctly 2020-04-20 13:53:29 -05:00
Matthew Bauer c45295d47e nixos/nixos-generate-config.pl: use modulesPath instead of <nixpkgs>
For imports, it is better to use ‘modulesPath’ than rely on <nixpkgs>
being correctly set. Some users may not have <nixpkgs> set correctly.
In addition, when ‘pure-eval=true’, <nixpkgs> is unset.
2020-04-20 09:57:17 -05:00
Matthew Bauer a2d9f58433 Merge pull request #85512 from ggreif/wasmtime
wasmtime-0.12.0: fix cargoSha256
2020-04-18 22:03:24 -05:00
Matthew Bauer 97fc083fd4 giac: broken on 64-bit blas 2020-04-17 16:24:31 -05:00
Matthew Bauer fcf33e2499 scs: breaks on 64bit blas 2020-04-17 16:24:31 -05:00
Matthew Bauer 98fb0ede70 arrayfire: remove mkl
This is unfree.
2020-04-17 16:24:30 -05:00
Matthew Bauer d83e9c9573 setup-hooks/audit-blas.sh: init
Add a simple hook that makes sure blas and lapack are linked to the
right place.
2020-04-17 16:24:25 -05:00
Matthew Bauer 7841b4290f pkgs/release-alternatives.nix: create
Add some ability to test the different BLAS/LAPACK implementations
together.
2020-04-17 16:24:16 -05:00
Matthew Bauer 1c8aba8334 treewide: use blas and lapack
This makes packages use lapack and blas, which can wrap different
BLAS/LAPACK implementations.

treewide: cleanup from blas/lapack changes

A few issues in the original treewide:

- can’t assume blas64 is a bool
- unused commented code
2020-04-17 16:24:09 -05:00
Matthew Bauer 43873351ff blas/lapack: add wrapper for “alternative”s of BLAS/LAPACK provider
This is based on previous work for switching between BLAS and LAPACK
implementation in Debian[1] and Gentoo[2]. The goal is to have one way
to depend on the BLAS/LAPACK libraries that all packages must use. The
attrs “blas” and “lapack” are used to represent a wrapped BLAS/LAPACK
provider. Derivations that don’t care how BLAS and LAPACK are
implemented can just use blas and lapack directly. If you do care what
you get (perhaps for some CPP), you should verify that blas and lapack
match what you expect with an assertion.

The “blas” package collides with the old “blas” reference
implementation. This has been renamed to “blas-reference”. In
addition, “lapack-reference” is also included, corresponding to
“liblapack” from Netlib.org.

Currently, there are 3 providers of the BLAS and LAPACK interfaces:

- lapack-reference: the BLAS/LAPACK implementation maintained by netlib.org
- OpenBLAS: an optimized version of BLAS and LAPACK
- MKL: Intel’s unfree but highly optimized BLAS/LAPACK implementation

By default, the above implementations all use the “LP64” BLAS and
LAPACK ABI. This corresponds to “openblasCompat” and is the safest way
to use BLAS/LAPACK. You may received some benefits from “ILP64” or
8-byte integer BLAS at the expense of breaking compatibility with some
packages.

This can be switched at build time with an override like:

    import <nixpkgs> {
        config.allowUnfree = true;
        overlays = [(self: super: {
          lapack = super.lapack.override {
            lapackProvider = super.lapack-reference;
          };
          blas = super.blas.override {
            blasProvider = super.lapack-reference;
          };
        })];
      }

or, switched at runtime via LD_LIBRARY_PATH like:

    $ LD_LIBRARY_PATH=$(nix-build -E '(with import <nixpkgs> {}).lapack.override { lapackProvider = pkgs.mkl; is64bit = true; })')/lib:$(nix-build -E '(with import <nixpkgs> {}).blas.override { blasProvider = pkgs.mkl; is64bit = true; })')/lib ./your-blas-linked-binary

By default, we use OpenBLAS LP64 also known in Nixpkgs as
openblasCompat.

[1]: https://wiki.debian.org/DebianScience/LinearAlgebraLibraries
[2]: https://wiki.gentoo.org/wiki/Blas-lapack-switch
2020-04-17 16:23:55 -05:00
Matthew Bauer 90326ba624 lapack: enable shared libraries, cblas, and tests 2020-04-17 16:17:12 -05:00
Matthew Bauer 6367a55312 fetchurl: don’t run ‘postFetch’ on hashed-mirrors
hashed-mirrors are content addressed. So if $outputHash is in the
hashed-mirror, changes from ‘postFetch’ would already be made. So,
running postFetch will end up applying the change /again/, which we
don’t want.
2020-04-16 16:36:56 -05:00
Matthew Bauer 57e20c5d87 Merge pull request #83362 from bachp/boinc
nixos/boinc: simplify setup of boinc service
2020-04-14 15:55:54 -04:00
Matthew Bauer 849f26d61c python.pkgs.grpcio: use system openssl, zlib, and c-ares 2020-04-14 15:13:37 -04:00
Matthew Bauer e520d6af29 Merge pull request #84415 from matthewbauer/mb-cross-fixes-april2020
Cross compilation fixes [april 2020]
2020-04-13 16:48:38 -04:00
Matthew Bauer 156c67858f Merge pull request #85017 from r-ryantm/auto-update/android-udev-rules
android-udev-rules: 20191103 -> 20200410
2020-04-13 11:11:25 -04:00
Matthew Bauer 473cf3a189 Merge pull request #85084 from primeos/android-studio-license-fix
android-studio: Fix the license (unfree)
2020-04-13 11:10:33 -04:00
Matthew Bauer 9ef6f1aa99 Merge pull request #84933 from matthewbauer/fix-bazel-copts
build-bazel-package: fix linkopt flags
2020-04-11 15:31:35 -04:00
Matthew Bauer 3fb4b17de5 Merge pull request #84860 from matthewbauer/fix-79651
generic/setup.sh: allow clobbering env-vars file
2020-04-11 01:50:42 -04:00
Matthew Bauer 53752d0374 Merge pull request #83181 from matthewbauer/move-win-outputs
gcc: move .dll.a* outputs to $lib
2020-04-10 23:44:06 -04:00
Matthew Bauer 184cd9f6ff build-bazel-package: fix linkopt flags
These values were incorrect. We need to use NIX_LDFLAGS, not
NIX_LD_FLAGS. Also need to prefix all flags with -Wl, for GCC to
accept it.
2020-04-10 15:41:39 -04:00
Matthew Bauer e0fb0df64f generic/setup.sh: allow clobbering env-vars file
If the option ‘noclobber’ is set in Bash, we get an error when we
clobber an already existing env-vars. This is an okay error to ignore,
so just >| instead. Note that >| is NOT a Bashism[[1]].

Fixes #79651

[1]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_02
2020-04-09 22:39:16 -04:00
Matthew Bauer 55e82502a5 Merge pull request #84689 from matthewbauer/fix-77290
kwallet-pam: just provide plugin path for qtbase
2020-04-09 10:49:09 -04:00
Matthew Bauer f0db4de598 kwallet-pam: unset QT_PLUGIN_PATH
kwallet sets a limit of 1000 for a single characters for environment
variables read from the socket[1]. wrapQtApps gives us a huge value
for QT_PLUGIN_PATH (up to 13000 bytes on my system!) Since this was
overflowing, the Qt plugin loading mechanism was hitting a segfault
when it was trying to parse the truncated QT_PLUGIN_PATH.

So for now, we can just unset QT_PLUGIN_PATH in the pam_kwallet_init
script. kwalletd5 has its own QT_PLUGIN_PATH which it can use.

This problem occured on 20.03, but not 19.09. It’s unclear what
changes were made in that time, but likely that previously we weren’t
getting a QT_PLUGIN_PATH set in the plasma5 startup at all. This means
that in 19.09 our QT_PLUGIN_PATH value must have been small enough to
fit into the 1000 char limit.

Fixes #77290

[1]: https://github.com/KDE/kwallet/blob/bc9713e2725ab1c4311866f751c674a38584bd92/src/runtime/kwalletd/main.cpp#L44

/cc @ttuegel
2020-04-09 10:48:14 -04:00
Matthew Bauer c6ff360cc4 python-dbusmock: avoid eval error when missing test output of bluez
This fixes an evaluation error that occurs when we don’t have
bluez.test. getOutput defaults to "out" in these cases.
2020-04-06 16:36:30 -04:00
Matthew Bauer 51ab062863 dvtm: add ncurses dev input to PATH
fixes cross compilation
2020-04-06 16:36:30 -04:00
Matthew Bauer dcb8c6fa8b kodi: fix cross compilation
- provide native binaries
- set cpu / os / etc. flags
- fix wayland compilation
2020-04-06 16:36:30 -04:00
Matthew Bauer 97309f7fa2 fstrcmp: patch for cross
Patches fstrcmp to cross-compile
2020-04-06 16:36:30 -04:00
Matthew Bauer 89dac3c856 flatbuffers: don’t build tests when cross compiling 2020-04-06 16:36:30 -04:00
Matthew Bauer 7887d50ae4 ftgl: add --with-ft-prefix for finding freetype
freetype-config is not in PATH when cross-compiling. We need to
provide our own.
2020-04-06 16:36:29 -04:00
Matthew Bauer bedd47ed4b libcddb: force malloc and realloc
This needs to be set to avoid having undefined malloc symbol.
2020-04-06 16:36:29 -04:00
Matthew Bauer a1c6dea273 libcdio: get native help2man 2020-04-06 16:36:29 -04:00
Matthew Bauer 72363f71bf libcec: get native cmake for cross 2020-04-06 16:36:29 -04:00
Matthew Bauer 433d5178ca setup-hooks/auto-patchelf.sh: get prefixed readelf 2020-04-06 16:36:29 -04:00
Matthew Bauer 5256aa688f libcrossguid: get prefixed utility 2020-04-06 16:36:29 -04:00
Matthew Bauer 5c80a3585b tinyxml2: fix cross compilation
- use native unzip
- add target prefix to LD
2020-04-06 16:36:28 -04:00
Matthew Bauer 71a9eb80e7 waylandpp: fix cross compilation
- add libffi dependency
- provide wayland-scanner++ when cross compiling
2020-04-06 16:36:28 -04:00
Matthew Bauer 99355cc2e4 libasyncns: override malloc null check in cross
This is needed to build and avoid malloc error.
2020-04-06 16:36:28 -04:00
Matthew Bauer a656aeb7f1 libvisual: fix null malloc check on cross
this is needed to build
2020-04-06 16:36:28 -04:00
Matthew Bauer 024877e7b2 alsa-plugins: move pkgconfig to native 2020-04-06 16:36:28 -04:00
Matthew Bauer 0bbdba2d11 bluez: don’t build python packages when tests are disabled
Can’t run these on cross anyway
2020-04-06 16:36:28 -04:00
Matthew Bauer e446334824 libvpx: set proper target name
- Needs to be like <cpu>-<os>-gcc.
- Remove unneeded --enable-external-build flag
    This confuses the feature detection and is not needed for cross
    compilation anymore.
2020-04-06 16:36:28 -04:00
Matthew Bauer 24f8bad37c libXres: enable cross-compilation
- adds utilmacros
- set null malloc flag
2020-04-06 16:36:27 -04:00
Matthew Bauer 7cc40e15e4 treewide/nixos: use stdenv.cc.libc instead of glibc when available
This prevents duplication in cross-compiled nixos machines. The
bootstrapped glibc differs from the natively compiled one, so we get
two glibc’s in the closure. To reduce closure size, just use
stdenv.cc.libc where available.
2020-04-06 16:36:27 -04:00
Matthew Bauer 8a5059e1cc fontconfig: only generate cache on native compilation
We can’t cross-compile the cache, so just skip it for now.
2020-04-06 16:36:22 -04:00
Matthew Bauer 6c5983a291 gdk-pixbuf: make target env hook
Unfortunately, we need to emulate the system to get a real cache.
Native version doesn’t know the right paths.
2020-04-06 16:36:22 -04:00
Matthew Bauer 93a8887531 hicolor-icon-theme: only add target icons to deps 2020-04-06 16:36:22 -04:00
Matthew Bauer 36109cda6e glib: put gsettings directory in target
These should be runtime, not build time deps
2020-04-06 16:36:22 -04:00
Matthew Bauer 80be56bd6a epiphany: include gtk3 build dependency 2020-04-06 16:36:21 -04:00
Matthew Bauer 777a2b4c56 xorg.libXScrnSaver: add utilmacros and malloc 0 2020-04-06 16:36:21 -04:00
Matthew Bauer 65b967fd38 libva: add wayland as native build input
Also set wayland-scanner to proper path
2020-04-06 16:36:21 -04:00
Matthew Bauer 3a71e62c56 plymouth: set systemd-tty-ask-password-agent path
This is needed in cross where systemd is not in path.
2020-04-06 16:36:21 -04:00
Matthew Bauer 139fd8b397 gdk-pixbuf: support cross compilation
- add glib to nativeBuildInputs
- only update loaders cache on native builds
2020-04-06 16:36:21 -04:00
Matthew Bauer f8347478a8 vulkan-loader: make cmake a native build input 2020-04-06 16:36:21 -04:00
Matthew Bauer 0f41c1582f cracklib: only use local binaries on native build 2020-04-06 16:36:21 -04:00
Matthew Bauer d0dbdfea4f git: fix cross compilation 2020-04-06 16:36:14 -04:00
Matthew Bauer 7d278d7e33 retroarch: add wayland dependency and fix cross
- Need custom pkg-config setting
- add wayland & libxkbcommon
2020-04-05 21:37:45 -04:00