Commit graph

89 commits

Author SHA1 Message Date
Eelco Dolstra
c189031e8b
Merge pull request #4549 from NixOS/installer-artifact
Test macos/linux installer script for each push
2021-02-25 16:08:43 +01:00
Daniël de Kok
2de232d2b3 Add x86_64 compute levels as additional system types
When performing distributed builds of machine learning packages, it
would be nice if builders without the required SIMD instructions can
be excluded as build nodes.

Since x86_64 has accumulated a large number of different instruction
set extensions, listing all possible extensions would be unwieldy.
AMD, Intel, Red Hat, and SUSE have recently defined four different
microarchitecture levels that are now part of the x86-64 psABI
supplement and will be used in glibc 2.33:

https://gitlab.com/x86-psABIs/x86-64-ABI
https://lwn.net/Articles/844831/

This change uses libcpuid to detect CPU features and then uses them to
add the supported x86_64 levels to the additional system types. For
example on a Ryzen 3700X:

$ ~/aps/bin/nix -vv --version | grep "Additional system"
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
2021-02-22 09:11:15 +01:00
Domen Kožar
ae4260f0a7
Generate installer script for each PR/push
This works by using Cachix feature of serving a file from
a store path.
2021-02-21 15:51:49 +00:00
sternenseemann
d0e34c85f8 libcmd/markdown: handle allocation errors in lowdown_term_rndr
We upgrade to lowdown 0.8.0 [1] which contains a fix/improvement to a
behavior mentioned in this issue thread [2] where a big part of
lowdown's API would just call exit(1) on allocation errors since that
is a satisfying behavior for the lowdown binary.

Now lowdown_term_rndr returns 0 if an allocation error occurred which we
check for in libcmd/markdown.cc.

Also the extern "C" { } wrapper around lowdown.h has been removed as it
is not necessary.

[1]: 6ca7c855a0/versions.xml (L987-L1006)
[2]: https://github.com/kristapsdz/lowdown/issues/45#issuecomment-756681153
2021-02-06 13:14:57 +01:00
Eelco Dolstra
271eedb837
Merge pull request #4495 from Infinisil/perl-bindings-passthru
Use passthru for perl-bindings, allows Nix patching for Hydra
2021-02-05 12:22:52 +01:00
Silvan Mosberger
d5acc4865c
Use passthru for perl-bindings, allows Nix patching for Hydra
This allows patching Nix for Hydra with additional overlays, because
`.overrideAttrs` and co. will persist the passthru's
2021-01-29 18:31:40 +01:00
Eelco Dolstra
f15f0b8e83 Update to lowdown 0.7.9 2021-01-26 10:47:40 +01:00
Matthew Bauer
be09af8002 Include static "nix" binary in Hydra build products
This allows users to get Nix from Hydra via a stable url like
https://hydra.nixos.org/build/132078238/download/1/nix
2020-12-03 18:05:18 -06:00
zimbatm
233b61d3d6
installer: simplify the per-build installation
The goal is to allow the installation and testing of arbitrary Nix
versions. Extend the base installer to accept a `--tarball-url-prefix
<url>` to change where the Nix tarball is getting downloaded from.

Once this is merged it should allow to:
1. Pick an evaluation at https://hydra.nixos.org/jobset/nix/master that
   looks healthy
2. Select the installedScript build and find the store path.

Now equipped with all of this, use an instance of nar-serve to fetch the
install script and release tarballs:

    curl -sfL https://nar-serve.numtide.com/nix/store/rkv4yh7pym941bhj0849zqdkg2546bdv-installer-script/install \
      | sh --tarball-url-prefix https://nar-serve.numtide.com/nix/store

Or with cachix, strip the /nix/store and derivation name and then:

    curl -sfL https://mycache.cachix.org/serve/rkv4yh7pym941bhj0849zqdkg2546bdv/install \
      | sh --tarball-url-prefix https://mycache.cachix.org/serve

Fixes #4047
2020-11-21 19:56:46 +01:00
Eelco Dolstra
3daa256728 Remove tests.binaryTarball
This test no longer works on Hydra because import-from-derivation is
no longer allowed.
2020-11-17 15:26:39 +01:00
Maximilian Bosch
3a63fc6cd5
Allow substituting paths when building remotely using ssh-ng://
Until now, it was not possible to substitute missing paths from e.g.
`https://cache.nixos.org` on a remote server when building on it using
the new `ssh-ng` protocol.

This is because every store implementation except legacy `ssh://`
ignores the substitution flag passed to `Store::queryValidPaths` while
the `legacy-ssh-store` substitutes the remote store using
`cmdQueryValidPaths` when the remote store is opened with `nix-store
--serve`.

This patch slightly modifies the daemon protocol to allow passing an
integer value suggesting whether to substitute missing paths during
`wopQueryValidPaths`. To implement this on the daemon-side, the
substitution logic from `nix-store --serve` has been moved into a
protected method named `Store::substitutePaths` which gets currently
called from `LocalStore::queryValidPaths` and `Store::queryValidPaths`
if `maybeSubstitute` is `true`.

Fixes #2770
2020-11-05 20:12:37 +01:00
John Ericson
82e4d2a82e No x86_32 static nix jobs for now
Fixes #4175
2020-10-28 05:13:18 +00:00
Domen Kožar
e0ca98c207
Merge pull request #3996 from abathur/macos_big_sur_fixes
Macos big sur installer fixes
2020-10-20 12:18:23 +02:00
Travis A. Everett
3a8699ac4f restore create-darwin-volume to release tarball
The move from release.nix to flake.nix appears to have lost some
changes from #3628 / 1c56f18a8122b605c28000e295d5e223f272cccd, leaving
create-darwin-volume.sh out of the release tarball.

Under the assumption that this was just an accident/byproduct of when
flake.nix split off and not intentional, I am restoring those edits.
2020-10-19 12:25:52 -05:00
Eelco Dolstra
c27fcd94ce Remove buildStatic from checks
checks should be relatively fast, but buildStatic depends on a lot of
stuff that isn't in the binary cache (e.g. musl builds of Git and
Mercurial that we probably don't need since we don't link against
them...).
2020-10-18 21:44:07 +02:00
Eelco Dolstra
62cf1d815a Switch to Nixpkgs 20.09 2020-10-18 21:31:27 +02:00
John Ericson
f6ed1a96b3 build-static -> buildStatic in Nix's flake 2020-10-15 18:54:36 +00:00
John Ericson
39de73550d Merge remote-tracking branch 'upstream/master' into fix-and-ci-static-builds 2020-10-09 18:26:47 +00:00
regnat
21639b2d17 Use gold as the linker on Linux
Saves ~7s in the linking phase
2020-09-23 16:10:31 +02:00
Eelco Dolstra
d110fdd03f Disable precompiled headers in 'nix develop'
They're still enabled in regular builds though.
2020-09-21 13:30:05 +02:00
regnat
9aa0dafe20 Update lowdown version
Fix #4042

According to 8aef9e9290, we shouldn't need to use a fork anymore so we can switch back to upstream
2020-09-21 13:11:31 +02:00
John Ericson
ec14465a00 Separate lowdown lib and bin to be more precise 2020-09-04 02:43:56 +00:00
John Ericson
25f7ff16fa Merge remote-tracking branch 'upstream/master' into fix-and-ci-static-builds 2020-09-04 02:40:36 +00:00
John Ericson
e12bcabdcb Remove duplicate buildInputs 2020-09-04 02:30:12 +00:00
Eelco Dolstra
50f46836f3
Merge remote-tracking branch 'origin/master' into markdown 2020-09-01 09:48:08 +02:00
Eelco Dolstra
ebb8e076eb Restore some of the shellHook 2020-08-31 16:39:54 +02:00
Eelco Dolstra
84f5cabbea Merge remote-tracking branch 'origin/master' into markdown 2020-08-31 14:24:26 +02:00
Eelco Dolstra
3156560d41 nix develop: Set output paths to writable locations
Currently, they're set to $(pwd)/outputs/$outputName. This allows
commands like 'make install' to work.
2020-08-28 18:16:03 +02:00
Eelco Dolstra
f5219f8d84 Fix perlBindings job 2020-08-25 10:33:41 +02:00
Eelco Dolstra
b42789f013
Fix clang build 2020-08-24 21:13:39 +02:00
Eelco Dolstra
b4ef3d7078
Revert "Add a separate manual job"
This reverts commit 5e3ad1dde0. Manual
generation now depends on the 'nix' command.
2020-08-19 21:00:57 +02:00
Eelco Dolstra
1d0a7b54fa
Enable syntax highlighting 2020-07-31 15:43:25 +02:00
Matthew Bauer
3537670fef Only enable static on linux 2020-07-30 15:53:49 -05:00
Matthew Bauer
13ef7a07b9 Fix build 2020-07-30 15:49:45 -05:00
Matthew Bauer
d7ffe327ae Merge remote-tracking branch 'origin/master' into fix-and-ci-static-builds 2020-07-30 14:59:57 -05:00
Eelco Dolstra
5e3ad1dde0
Add a separate manual job 2020-07-23 18:27:20 +02:00
Eelco Dolstra
e0ea3c82ca
Use mdbook 2020-07-23 18:26:48 +02:00
Eelco Dolstra
650ae14ced
Markdown test 2020-07-23 18:26:48 +02:00
Eelco Dolstra
1524752c17 Merge remote-tracking branch 'origin/master' into flakes 2020-06-17 10:26:52 +02:00
Eelco Dolstra
e938add10d flake.nix: Remove edition 2020-06-09 11:23:23 +02:00
Eelco Dolstra
17ca997fc6 Merge remote-tracking branch 'origin/master' into flakes 2020-05-28 12:55:24 +02:00
Eelco Dolstra
1ad71bc62c Remove support for old lockfiles and the epoch/uri attributes 2020-05-06 17:48:18 +02:00
Eelco Dolstra
e5ea01c1a8
Remove flake 'edition' field
Future editions of flakes or the Nix language can be supported by
renaming flake.nix (e.g. flake-v2.nix). This avoids a bootstrap
problem where we don't know which grammar to use to parse
flake*.nix. It also allows a project to support multiple flake
editions, in theory.
2020-04-10 10:24:09 +02:00
Eelco Dolstra
e35d83d1fc Fix job name 2020-04-03 20:11:14 +02:00
Eelco Dolstra
bf70a047a0 Publish a tarball containing the crates we depend on
This is needed since we no longer produce a source tarball.
2020-04-03 20:06:26 +02:00
Eelco Dolstra
bb39f2bb8a Temporary backward compatibility hack 2020-04-02 19:12:14 +02:00
Eelco Dolstra
ab47868639 Change lastModified to the number of seconds in the epoch
'lastModifiedDate' is now a string representing the equivalent
date/time.
2020-04-02 18:39:41 +02:00
Eelco Dolstra
36c34c3b1f Set version properly 2020-04-01 00:20:12 +02:00
Eelco Dolstra
5f75d56c9b flake.nix: Support Nixpkgs 19.09 2020-03-28 16:51:10 +01:00
Eelco Dolstra
bc5d4843a9 Fix coverage job 2020-03-20 13:39:39 +01:00