Commit graph

260 commits

Author SHA1 Message Date
Eelco Dolstra
e2d7569685
Add a test for GitHub flakes
Fixes #2889.
2019-06-11 21:46:46 +02:00
Eelco Dolstra
0f840483c7
Add date of last commit to SourceInfo
This is primarily useful for version string generation, where we need
a monotonically increasing number. The revcount is the preferred thing
to use, but isn't available for GitHub flakes (since it requires
fetching the entire history). The last commit timestamp OTOH can be
extracted from GitHub tarballs.
2019-05-29 10:10:36 +02:00
Eelco Dolstra
5a80cccc70
Hack to fix tests.evalNixpkgs 2019-05-11 01:48:33 +02:00
Eelco Dolstra
cbfdea6857 fetchGit -> fetchTarball 2019-04-19 14:41:59 +02:00
Eelco Dolstra
a9ceeeb4b0 Add a flake.nix 2019-04-08 23:09:18 +02:00
Eelco Dolstra
2f59b30251 Use Nixpkgs 19.03 2019-04-01 21:09:25 +02:00
Will Dietz
0bebca402a
version -> .version, avoid conflict with C++20 <version> 2019-03-25 09:18:30 +01:00
zimbatm
b402148d8f
remove noop uses of nix-store --init
the nix-store --init command is a noop apparently
2019-02-22 21:07:53 +01:00
Eelco Dolstra
4ae6e84901
install: Use base-16 hashes
Issue #2623.
2019-01-11 16:33:59 +01:00
Will Dietz
d4f78a6b64 bump base nixpkgs used by default 18.03 -> 18.09 2018-09-26 15:37:13 -05:00
Eelco Dolstra
39f1722f36
nix upgrade-nix: Handle .nix-profile being a link to .../profiles/per-user/...
Also some cosmetic improvements.
2018-08-30 21:18:56 +02:00
Eelco Dolstra
264e66f696
Add simple test for nix upgrade-nix 2018-08-30 17:10:28 +02:00
Eelco Dolstra
145db703e5
Remove boost from the closure
This reduces the size of the closure by 45 MiB.
2018-08-30 16:03:06 +02:00
Eelco Dolstra
1b01954a3d
Merge pull request #2368 from dezgeg/drop-dead-code
Drop dead code
2018-08-22 21:32:49 +02:00
Eelco Dolstra
954d1f4d0a
Disable the Ubuntu 17.10 build
Ubuntu 17.10 doesn't have libbrotli.

https://hydra.nixos.org/build/79867741
2018-08-21 15:33:29 +02:00
Tuomas Tynkkynen
2894197de7 Drop all references to NIX_INDENT_MAKE
Dead code since 6669a3b477
2018-08-20 02:01:59 +03:00
Tuomas Tynkkynen
458282be59 Drop all references to --disable-init-state
It's all dead code since 2014 (commit 0c6d62cf27).
2018-08-20 01:51:23 +03:00
Eelco Dolstra
94b2e4e1be
Disable rpm_fedora27x86_64
Fedora 27 provides an incompatible version of Boost (1.64.0).
2018-07-31 17:34:53 +02:00
Eelco Dolstra
bd19959d90
Fix RPM build
https://hydra.nixos.org/build/73991153
2018-07-31 11:53:53 +02:00
Eelco Dolstra
7c3c635d4f
release.nix: Generate the installer script 2018-05-30 17:40:08 +02:00
Eelco Dolstra
a99027d587
Fix tests.evalNixOS
This failed because NixOS' release.nix calls builtins.fetchGit.
2018-04-19 15:29:31 +02:00
Eelco Dolstra
e3cdcf89b0
Remove non-existant fedora27i386 2018-04-11 11:48:42 +02:00
Bogdan Seniuc
b828051659
release.nix: Use $sourceRoot instead of hardcoded source directory 2018-04-07 10:15:41 +03:00
Graham Christensen
2921165a9d
Expand the multi-user installer to support Linuxes with systemd
- darwin installer: delete hardware report, not necessary
 - moves os-specific code from the darwin installer to to `poly_*`
   functions
 - adds profile.d support to the profile targets, which automatically
   handles many distros which don't have a /etc/bashrc but do have an
   /etc/profile.d
 - /bin/bash -> /usr/bin/env bash
 - document why each excluded shellcheck check is excluded
 - rename the multi-user to Daemon-based
2018-03-29 15:38:01 -04:00
Tuomas Tynkkynen
cc6712ae90 release.nix: Use pkgs.closureInfo for binaryTarball
pathsFromGraph is legacy since Nix 2.0.
2018-03-26 15:47:14 +03:00
Eelco Dolstra
2bc6cfe1ad
Add Boost dependency to Fedora/Ubuntu builds 2018-03-22 14:15:46 +01:00
Eelco Dolstra
ed87fd17dd
Remove Fedora / Ubuntu releases that are no longer in Nixpkgs 2018-03-22 13:32:18 +01:00
Eelco Dolstra
92aee1b7d6
Remove some release-critical jobs
The release does not in fact depend on Ubuntu/Fedora builds (we don't
publish the build results).
2018-03-22 13:03:56 +01:00
Eelco Dolstra
78d0c72b52
Fix coverage job 2018-03-20 14:55:47 +01:00
Eelco Dolstra
44a1b6c026
Fix build on non-x86_64-linux 2018-03-19 11:57:34 +01:00
Eelco Dolstra
c04bca3401
Factor out commonality between release.nix and shell.nix 2018-03-14 19:25:09 +01:00
Eelco Dolstra
ca14b14200
Use boost::format from the boost package
Note that this only requires headers from boost so it doesn't add a
runtime dependency.

Also, use Nixpkgs 18.03.
2018-03-14 19:24:04 +01:00
Will Dietz
e9a5ce9b07 release.nix: don't try to use nix-2.0 branch, no longer exists
Probably should point at the 18.03 release branch once that's made.
2018-03-03 13:48:54 -06:00
Eelco Dolstra
cea4fb3a31
Fix evaluation of binaryTarball.aarch64-linux 2018-02-20 12:33:32 +01:00
Eelco Dolstra
cfdfad5c34
Simplify 2018-02-07 14:15:20 +01:00
Eelco Dolstra
0f3dae1064
Merge branch 'fix-aarch64-test' of https://github.com/grahamc/nix 2018-02-07 14:12:15 +01:00
Eelco Dolstra
0c95776c3e
Don't define builtins.{currentSystem,currentTime} in pure mode
This makes it easier to provide a default, e.g.

  system = builtins.currentSystem or "x86_64-linux";
2018-01-18 16:38:48 +01:00
Eelco Dolstra
d4dcffd643
Add pure evaluation mode
In this mode, the following restrictions apply:

* The builtins currentTime, currentSystem and storePath throw an
  error.

* $NIX_PATH and -I are ignored.

* fetchGit and fetchMercurial require a revision hash.

* fetchurl and fetchTarball require a sha256 attribute.

* No file system access is allowed outside of the paths returned by
  fetch{Git,Mercurial,url,Tarball}. Thus 'nix build -f ./foo.nix' is
  not allowed.

Thus, the evaluation result is completely reproducible from the
command line arguments. E.g.

  nix build --pure-eval '(
    let
      nix = fetchGit { url = https://github.com/NixOS/nixpkgs.git; rev = "9c927de4b179a6dd210dd88d34bda8af4b575680"; };
      nixpkgs = fetchGit { url = https://github.com/NixOS/nixpkgs.git; ref = "release-17.09"; rev = "66b4de79e3841530e6d9c6baf98702aa1f7124e4"; };
    in (import (nix + "/release.nix") { inherit nix nixpkgs; }).build.x86_64-linux
  )'

The goal is to enable completely reproducible and traceable
evaluation. For example, a NixOS configuration could be fully
described by a single Git commit hash. 'nixos-rebuild' would do
something like

  nix build --pure-eval '(
    (import (fetchGit { url = file:///my-nixos-config; rev = "..."; })).system
  ')

where the Git repository /my-nixos-config would use further fetchGit
calls or Git externals to fetch Nixpkgs and whatever other
dependencies it has. Either way, the commit hash would uniquely
identify the NixOS configuration and allow it to reproduced.
2018-01-16 19:23:18 +01:00
Will Dietz
435ccc7980 release: access fetchGit from builtins to fix eval w/1.11 (<1.12) 2018-01-10 14:19:29 -06:00
Benjamin Hipple
1882e802e7 Fix Fedora 25 i386 RPM build 2018-01-04 19:44:32 -05:00
Benjamin Hipple
4cb5c51375 Fix RPM builds by increasing VM memory size
The VM was running out of RAM while handling debug symbols, which caused the
eu-strip to fail while separating debug symbols.
2018-01-02 23:39:42 -05:00
Eelco Dolstra
4801420893
Remove debug line 2017-12-25 14:53:15 +01:00
Eelco Dolstra
6d80870832
release.nix: Use fetchTarball and fetchGit
In particular, using fetchGit means we don't need hackery to clean the
source tree when building from an unclean tree.
2017-12-22 11:35:32 +01:00
Graham Christensen
e4ece83b1a
tests.setuid: only on i686 and x86_64 linuxs 2017-12-12 08:31:31 -05:00
Eelco Dolstra
7f2c324ed1
Simplify build by including nlohmann/json.hpp 2017-12-04 17:11:36 +01:00
Eelco Dolstra
2f5789c5d6
Add dependencies for coverage test 2017-11-14 18:47:44 +01:00
Eelco Dolstra
4b45d8c95a
Update lcov filter 2017-11-14 18:47:37 +01:00
Eelco Dolstra
c0d93a01ee
Remove ncurses-bin 2017-11-14 14:16:16 +01:00
Eelco Dolstra
4dee01da7c
fetchGit: Add a test 2017-11-03 13:55:30 +01:00
Eelco Dolstra
1969f357b7
Add fetchMercurial primop
E.g.

  $ nix eval '(fetchMercurial https://www.mercurial-scm.org/repo/hello)'
  { branch = "default"; outPath = "/nix/store/alvb9y1kfz42bjishqmyy3pphnrh1pfa-source"; rev = "82e55d328c8ca4ee16520036c0aaace03a5beb65"; revCount = 1; shortRev = "82e55d328c8c"; }

  $ nix eval '(fetchMercurial { url = https://www.mercurial-scm.org/repo/hello; rev = "0a04b987be5ae354b710cefeba0e2d9de7ad41a9"; })'
  { branch = "default"; outPath = "/nix/store/alvb9y1kfz42bjishqmyy3pphnrh1pfa-source"; rev = "0a04b987be5ae354b710cefeba0e2d9de7ad41a9"; revCount = 0; shortRev = "0a04b987be5a"; }

  $ nix eval '(fetchMercurial /tmp/unclean-hg-tree)'
  { branch = "default"; outPath = "/nix/store/cm750cdw1x8wfpm3jq7mz09r30l9r024-source"; rev = "0000000000000000000000000000000000000000"; revCount = 0; shortRev = "000000000000"; }
2017-11-01 17:45:32 +01:00