Commit Graph

3808 Commits

Author SHA1 Message Date
Benjamin Hipple
21be830522
Merge pull request #85799 from matthewbauer/blas-lapack-expand-docs
BLAS/LAPACK fixup and expand docs
2020-04-22 21:56:20 -04: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
Frederik Rietdijk
8374a2a0ee Merge master into staging-next 2020-04-22 17:20:20 +02:00
zimbatm
bbbc419186
srcOnly: fix invocation and document
Previously, callPackage would try and fill the arguments such as `name`
and `src` which would cause problems if those existed as top-level
attributes. This also makes it clearer what part is the function
signature.

Then document the derivation inline in the code to explain the ellipsis
and various use-cases.
2020-04-22 14:06:28 +02:00
edef
e71990711f
Merge pull request #85680 from NixOS/fix-srconly
srcOnly: ignore additional arguments
2020-04-21 22:45:34 +00:00
Frederik Rietdijk
23be4a8b4d Merge master into staging-next 2020-04-21 19:59:56 +02:00
edef
11e13acc46 srcOnly: ignore additional arguments
This reverts commit b32a057425,
which breaks even the most straightforward uses of srcOnly:

    nix-repl> srcOnly guile
    error: anonymous function at /home/src/nixpkgs/pkgs/build-support/src-only/default.nix:1:1 called with unexpected argument 'drvPath', at /home/src/nixpkgs/lib/customisation.nix:69:16

    nix-repl> srcOnly hello
    error: anonymous function at /home/src/nixpkgs/pkgs/build-support/src-only/default.nix:1:1 called with unexpected argument 'drvPath', at /home/src/nixpkgs/lib/customisation.nix:69:16

Link: https://github.com/NixOS/nixpkgs/pull/80903#issuecomment-617172927
2020-04-21 13:20:17 +00:00
Frederik Rietdijk
803b3d296c Merge staging-next into staging 2020-04-21 08:29:51 +02: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
Dmitry Kalinkin
c450617f99
bintools-wrapper: only propagate .info output if it exists in the original 2020-04-20 23:49:02 -04: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
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
Lars Jellema
8e79583510 gnat: init at 9.3.0 2020-04-20 14:41:22 +02:00
Sébastien Maret
712bf551d8 blas: fix build on darwin 2020-04-19 23:07:10 +02:00
John Ericson
1ea80c2cc3 Merge remote-tracking branch 'upstream/master' into staging 2020-04-18 15:40:49 -04:00
John Ericson
eb4acb6ca9
Merge pull request #85468 from Ericson2314/no-dumpmachine
treewide: Get rid of -dumpmachine in favor of static info
2020-04-18 00:35:19 -04:00
John Ericson
e3d50e5cb0 Merge branch 'master' of github.com:NixOS/nixpkgs into staging 2020-04-18 00:10:08 -04:00
Milan Pässler
fc5090b315 blas: fix build 2020-04-18 03:06:47 +02:00
John Ericson
33c2a76c5e Merge remote-tracking branch 'upstream/master' into staging 2020-04-17 18:40:51 -04: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
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
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
Silvan Mosberger
c60e559e13
trivial-builders: Sanitize derivation name
This then supports using functions like writeShellScriptBin with script names
that would be invalid as derivation names
2020-04-15 00:31:57 +02:00
John Ericson
c8a6ea5161 Merge remote-tracking branch 'upstream/master' into staging 2020-04-13 22:17:15 -04:00
John Ericson
204d710405 treewide: Get rid of -dumpmachine in favor of static info 2020-04-13 19:26:19 -04:00
Andreas Rammhold
84b91899c3
Merge pull request #85172 from andir/buildRustCrate-proc-macro
buildRustCrate: support proc-macro in default prelude
2020-04-13 23:35:19 +02: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
Andreas Rammhold
310b5f6c34
Merge pull request #84179 from kolloch/build-rust-crate-multi-version-rename
buildRustCrate: Allow version specific dependency renaming + parameter doc
2020-04-13 16:25:16 +02:00
Andreas Rammhold
a9fdfebc6b
buildRustCrate: support proc-macro in default prelude 2020-04-13 16:01:21 +02: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
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
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Peter Kolloch
bb660fe228 buildRustCrate: Support versioned crate renames 2020-04-10 00:55:44 +02:00
Peter Kolloch
5f9af254a5 buildRustCrate: Document parameters
I know, heretic, but...

I also know that this is not perfect but it is a good start, I think. It
would be nice if this were part of the automatic "nixdoc" function
reference. I'd like guidance if this should be part of the rust section
or something else.
2020-04-10 00:55:05 +02:00
Matthew Bauer
433d5178ca setup-hooks/auto-patchelf.sh: get prefixed readelf 2020-04-06 16:36:29 -04:00
Elis Hirwing
3b6539896b
Merge pull request #83896 from etu/slim-down-default-php-v3
PHP: Make the default package more sane [v3]
2020-04-05 20:00:03 +02:00
talyz
9ac0d9ad61
php.packages.buildPecl: Introduce built-in extension dependencies
Introduce the internalDeps attribute used by mkExtension, to refer to
internal php extensions built by mkExtension.
2020-04-05 16:44:13 +02:00
Frederik Rietdijk
866c5aa090 Merge master into staging-next 2020-04-05 08:33:39 +02:00
Matthew Bauer
eab992b4ac
Merge pull request #83112 from bhipple/dev/reltools-cleanup
releaseTools: no-op expression cleanup
2020-04-04 17:18:28 -05:00
Frederik Rietdijk
92124ed660 Merge master into staging-next 2020-04-03 21:54:40 +02:00
Robert Helgesson
bf486f784d
emacs: fix setup-hook
This change fixes byte compilation of, e.g., Helm without breaking
builds using, e.g., `trivialBuild`.

See https://github.com/NixOS/nixpkgs/pull/82604#issuecomment-607201755
2020-04-02 23:04:08 +02:00
Léo Gaspard
a3ee24b2ff
Merge pull request #83894 from symphorien/unbreak-os-prober-test
Unbreak os prober test
2020-03-31 22:17:27 +02:00
Jan Tojnar
dbb4a47de0
Merge branch 'staging-next' into staging 2020-03-31 21:33:00 +02:00
Jan Tojnar
3e0f4e202f
Merge branch 'master' into staging-next 2020-03-31 21:32:15 +02:00
Orivej Desh
7df81361e4 makeDesktopItem: make categories optional
"Application" is deprecated, "Other" is invalid, there are no generic
categories, and the Categories fields is optional per the spec.

Fixes the defaults after #75729.
2020-03-31 04:10:58 +00:00
worldofpeace
dcf6e71d73
Merge pull request #75729 from worldofpeace/validate-makeDesktopItem
makeDesktopItem: add desktop file validation
2020-03-30 14:27:40 -04:00
Profpatsch
bf3bd5fee1 skawarePackages: support static builds via pkgsStatic
Most of the skaware packages already build just fine with pkgsStatic,
however the wrapper scripts for execline and stdnotify-wrapper needed
the `-lskarlib` argument to go at the end.

`utmps` and `nsss` still fail with this error:

```
exec ./tools/install.sh -D -m 600 utmps-utmpd /bin/utmps-utmpd
/build/utmps-0.0.3.1/tools/install.sh: line 48: can't create /bin/utmps-utmpd.tmp.479: Permission denied
make: *** [Makefile:121: /bin/utmps-utmpd] Error 1
```
2020-03-30 01:35:39 +02:00
Profpatsch
7329dfcc63 buildSkawarePackage: use pname and version directly 2020-03-30 01:23:46 +02:00
Profpatsch
894c74da1f Revert "buildSkawarePackage: pass through extra args"
This reverts commit a50653295d.

The reasons cited were “debugging”, in which case
you can just add the attribute to `buildSkawarePackage`
and “customizing”, which is still possible with
a normal `overrideDerivation`.

The patch removed `outputs` for some reason
(possible oversight), so building nsss failed.
Plus lots of complexity (e.g. don’t forget to add new
arguments to `removeAttrs` otherwise there’s a bug now).
2020-03-30 01:23:46 +02:00
Symphorien Gibol
671dc2a5ca vmTools.diskImageFuns.debian9i386: update source url
referenced packets were removed from the mirrors

Fixes #77396 #80041
2020-03-29 15:30:15 +02:00
Jörg Thalheim
e8323a0bf9
buildRustPackage: enable strictDeps
This will improve cross-compiling support by forcing
users to specify buildInputs/nativeBuildInputs correctly.
2020-03-29 14:09:32 +01:00
Jörg Thalheim
10059e4b71
Merge remote-tracking branch 'upstream/master' into HEAD 2020-03-29 14:08:10 +01:00
Peter Kolloch
782b304dba buildRustCrate: Add tests for checking files in outputs.
...and remove superfluous dependency files (*.d).
...and copy dSYM directories on Mac OS when in release=false mode.
2020-03-29 13:00:21 +02:00
Frederik Rietdijk
a36be028f5 Merge staging-next into staging 2020-03-28 21:15:15 +01:00
Andreas Rammhold
c8de31baa6 buildRustCrateTests: Fix link order test on darwin
As it turns out Darwin does most of the things differently then "normal"
systems. They are using a different shared library extension and require
an obscure commandline parameter that has to be added to every build
system out there. That issue seems to be with clang on Darwin as on
Linux that flag isn't required to build the very same tests (when using
clang).

After adjusting these two details the tests are running fine on the
darwin box that I was able to obtain.
2020-03-28 21:13:16 +01:00
Andreas Rammhold
d86bfec309
Merge pull request #83379 from symphorien/rust-link
buildRustCrate: don't sort link flags
2020-03-28 16:02:51 +01:00
Symphorien Gibol
2f7fb1c497 buildRustCrateTests: add regression test for link order 2020-03-28 12:00:00 +00:00
Alyssa Ross
7533876312
buildRustCrate: fewer backslashes
This is a slight readability boost, I think.
2020-03-27 09:56:19 +00:00
Benjamin Hipple
259f3b3b68
Revert "fetchzip, fetchgit: cleanup handling of optional features and whitespace" 2020-03-26 00:35:40 -04:00
Benjamin Hipple
368ea2eb5e
Merge pull request #79581 from bhipple/feature/fetcher-whitespace-clean
fetchzip, fetchgit: cleanup handling of optional features and whitespace
2020-03-26 00:15:24 -04:00
Symphorien Gibol
d8b853799d buildRustCrate: don't sort link flags
Linkage order is significant and sorting can result in link errors.
2020-03-25 12:00:00 +00:00
Jan Tojnar
986fbf4799
Merge branch 'staging-next' into staging 2020-03-24 01:51:55 +01:00
Vincent Laporte
0229936bbe buildDunePackage: add a “useDune2” option 2020-03-23 09:12:50 +01:00
Orivej Desh
1b89aa3f7a Merge branch 'master' into staging 2020-03-23 00:53:16 +00:00
Benjamin Hipple
79d875ae77 releaseTools: no-op expression cleanup
No functional change, was just reading through these and cleaning/sanitizing
them a bit while I'm here.
2020-03-21 21:15:33 -04:00
Bryan Gardiner
bc21c247fc
patch-shebangs.sh: Fix error messages to go to stderr, not '0' file. 2020-03-20 17:08:10 -07:00
Andreas Rammhold
4e8d0993a9
Merge pull request #82404 from danieldk/build-script-link-fix
buildRustCrate: only link build deps into build script
2020-03-20 17:56:21 +01:00
John Ericson
19a0b38cbe
Merge pull request #82882 from obsidiansystems/armv6-embedded
Misc fixes for armv6 bare metal cross
2020-03-19 10:38:22 -04:00
Benjamin Hipple
05343f6ff1 rust: remove legacy cargo fetcher
We have now migrated every single Rust package in NixPkgs! This deletes the
legacy fetcher, which is now unused.

Resolves #79975
2020-03-18 20:12:32 -07:00
John Ericson
bc054004ac cc-wrapper, clang: libstdcxxHook should a propagated build input
Lumping it in with the target platform libraries was incorrect, and
caused eval failures when gcc couldn't be built for the target platform.
2020-03-18 11:28:52 -04:00
Robert Helgesson
2d2de743d0
emacs: improve setup hook
- Add packages installed in a sub-directory of site-lisp, such as
  mu4e, to EMACSLOADPATH.

- Add ELPA packages to EMACSLOADPATH.

- Add each package only once to EMACSLOADPATH. Before, each package
  would typically be added twice for each transitive dependency
  leading to a huge variable for a package having many dependencies.

Fixed #78680
2020-03-14 19:46:28 +01:00
Daniël de Kok
412c72d20f buildRustCrate: sort linker options in-place 2020-03-13 11:21:07 +01:00
Daniël de Kok
ea6e048c37 buildRustCrate: only link build deps into build script
According to the Cargo documentation:

> The build script does not have access to the dependencies listed in
> the dependencies or dev-dependencies section (they’re not built
> yet!). Also, build dependencies are not available to the package
> itself unless also explicitly added in the [dependencies] table.

https://doc.rust-lang.org/cargo/reference/build-scripts.html

This change separates linkage of regular dependencies and build
dependencies.
2020-03-13 11:13:27 +01:00
Vladimír Čunát
f8d4120c52
Merge branch 'master' into staging-next
Hydra nixpkgs: ?compare=1574844
2020-03-10 17:18:44 +01:00
John Ericson
320334aee7
Merge pull request #82130 from Ericson2314/fetchsvn-cross
fetchsvn: Fix for cross
2020-03-10 09:53:17 -04:00
Andreas Rammhold
e968961d14
Merge pull request #82155 from kolloch/buildRustCrate_findMatchingDir
buildRustCrate: Search for matching Cargo.toml in sub directories
2020-03-10 13:27:26 +01:00
Mario Rodas
cad87836ac
Merge pull request #81974 from bhipple/feature/rust-doc
buildRustPackage: update docstring comment
2020-03-10 06:38:42 -05:00
Vladimír Čunát
1d9c10c8de
stdenv cc-wrapper: deal with edge-case regressions
Regression introduced in PR #81191 80729b6787.  The file does not exist
somewhere during bootstrap of pkgsStatic.busybox which is used in nix
(by default).

I tested the builds.
2020-03-10 11:09:26 +01:00
Peter Kolloch
8a6638daa9 build-support/rust/buildRustCrate: Search for matching Cargo.toml in sub directories
This is what cargo does for git repositories.

See related issues:

* https://github.com/kolloch/crate2nix/issues/53
* https://github.com/kolloch/crate2nix/issues/33
2020-03-09 15:11:50 +01:00
Peter Kolloch
04e7462ee6 buildRustCrate: refactor colored logging
* Make errors include the crate name and make them much more prominent.
* Move more code into lib.sh
* Already source generated logging code and lib.sh in configure
2020-03-09 14:26:28 +01:00
Jörg Thalheim
115a8e8d14
Merge pull request #81833 from bignaux/appimage-run
appimage-run: unify appimageTools and appimage-run
2020-03-09 11:18:21 +00:00
John Ericson
2607aae93f fetchsvn: Fix for cross
Just use `nativeBuildInputs` at build time.
2020-03-09 02:11:45 -04:00
Domen Kožar
508a2c6849
Merge pull request #80921 from hercules-ci/buildLayeredImage-allow-empty-store
buildLayeredImage: Allow empty store, no paths to add
2020-03-08 23:05:27 +01:00
Bignaux Ronan
a3df64c8a7 appimage-exec.sh: simplify and improve getopts options 2020-03-08 20:34:23 +01:00
Bignaux Ronan
49e7871196 appimageTools: wrapType1 = wrapType2; 2020-03-08 18:07:04 +01:00
Bignaux Ronan
95dc1ef1f0 appimageTools: fix appimage-exec.sh passing arguments 2020-03-08 13:53:48 +01:00
Bignaux Ronan
2a6cd0e6c0 appimageTools: fix appimage-exec.sh according to shellcheck 2020-03-08 13:38:32 +01:00
John Ericson
5c4dd08a03
Merge pull request #81191 from clkamp/stdenv-multi-line-libc-cflags
stdenv: Fix gcc multi line libc-cflags
2020-03-07 21:28:33 -05:00
Bignaux Ronan
b36d3f2c4a appimage: replace writeScript to a standalone appimage-exec.sh 2020-03-07 20:24:26 +01:00
Benjamin Hipple
37fb7a5568 buildRustPackage: update docstring comment
The inlined readme that we were iterating on has been moved to GitHub
issue #79975, and the default is now the new cargo fetcher, so this
doc comment is out of date.
2020-03-07 09:34:29 -05:00
Christian Lütke-Stetzkamp
80729b6787 stdenv: Fix gcc multi line libc-cflags
which broke at least libstdc++5.

Closes #79761
2020-03-06 10:34:57 +01:00
Frederik Rietdijk
188c3a4d03 Merge staging-next into staging 2020-03-06 07:09:30 +01:00
Matthew Bauer
b8102aa32e
Merge pull request #81844 from lopsided98/gcc-separate-output-cross
gcc: place cross-compiled target libraries in lib output
2020-03-05 20:30:35 -05:00
Jan Tojnar
ef34994d9a
Merge pull request #81564 from NixOS/fetchpatch-base64
fetchpatch: Allow using base64-encoded hash
2020-03-04 23:32:29 +01:00
Ben Wolsieffer
e1831ebea3 gcc: move target-specific runtime libraries to separate output 2020-03-04 16:12:36 -05:00
Jan Tojnar
1a44e325d2
Merge branch 'staging-next' into staging 2020-03-04 21:24:05 +01:00
Jan Tojnar
bf83a7cc66
Merge pull request #81572 from bignaux/appimage
appimage: refactoring extractType2 to avoid use of appimage packer
2020-03-04 16:06:09 +01:00
Bignaux Ronan
3443b693cc appimage: fix suspicious ownership 2020-03-04 15:10:11 +01:00
Bignaux Ronan
92b36343a8 appimage: split checks between appimageSignature and appimageType 2020-03-04 13:57:58 +01:00