Commit Graph

56 Commits

Author SHA1 Message Date
Eelco Dolstra
ca657525b8
Don't install unit tests 2020-05-08 12:03:27 +02:00
Eelco Dolstra
7898cdb75a
make check: Run unit tests 2020-05-08 11:49:40 +02:00
Eelco Dolstra
e322a16523 Remove global -I flags
(cherry picked from commit 2c692a3b14)
2020-03-30 15:30:19 +02:00
Eelco Dolstra
cc5c81822d
mk/README.md: Remove
The make-rules repo is not maintained.
2020-03-13 14:50:51 +01:00
Eelco Dolstra
50d483a2c1 Fix precompiled-headers generation
It's now regenerated when util.hh changes, and is ordered after
config.h to fix a race.
2019-12-05 20:26:24 +01:00
Eelco Dolstra
e5bf81256c
Fix Perl bindings 2019-11-07 12:18:37 +01:00
Eelco Dolstra
5ff4d77f55
Precompile headers
This cuts 'make install -j6' on my laptop from 170s to 134s.
2019-11-07 10:12:35 +01:00
Sergei Trofimovich
fe068eca00 mk: add support for passing LDFLAGS to libs and bins
autotools-based systems usually allow user to
append own LDFLAGS like
    LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
at ./configure stage

This change plumbs LDFLAGS through similar to existing CXXFLAGS variable.

Signed-off-by: Sergei Trofimovich <siarheit@google.com>
2019-07-03 04:32:25 +02:00
Matthew Bauer
7ce1fae59f Support --disable-shared flag.
This tells Nix to not build the shared libraries.
2019-02-13 00:03:10 -05:00
Andrew Dunham
f8ab9cef6c Fix missing $DESTDIR when installing programs 2018-04-08 18:22:10 -07:00
Shea Levy
88cd2d41ac
Add plugins to make Nix more extensible.
All plugins in plugin-files will be dlopened, allowing them to
statically construct instances of the various Register* types Nix
supports.
2018-02-08 12:44:37 -05: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
Eelco Dolstra
fd10f6f241
Show when tests are skipped
Also, don't depend on tput (ncurses). It's really not needed since
ANSI escape sequences have been standardized for 35 years or so.
2017-11-07 12:09:57 +01:00
Eelco Dolstra
838509d1a0
Whitespace 2017-10-09 15:41:09 +02:00
Jörg Thalheim
e94fc238cf fixing bashisms in test code
This fixed the build on ubuntu/debian, where dash is the sh.
2017-10-06 06:12:33 -05:00
Dan Peebles
60ecbd7934 More elegant test output
I got sick of trying to find the failures in the sea of debug output, so
we now:
- Hide test output unless it fails
- Sprinkle in some simple color
- Pad results for a more tabular look

If Nix is getting a more friendly user interface, we might as well get
a friendlier developer interface, right? :)
2017-10-03 00:59:32 -04:00
David McFarland
d35231ec60 set _GNU_SOURCE on cygwin
this is needed for pipe2()
2017-04-21 11:27:27 -03:00
Eelco Dolstra
215b70f51e
Revert "Get rid of unicode quotes (#1140)"
This reverts commit f78126bfd6. There
really is no need for such a massive change...
2016-11-26 00:38:01 +01:00
Guillaume Maudoux
f78126bfd6 Get rid of unicode quotes (#1140) 2016-11-25 15:48:27 +01:00
Manuel Jacob
c999ef70e8 Don't pass "--no-copy-dt-needed-entries" option to linker on FreeBSD.
Eventually the nested if statements should be replaced by a more general
condition, but this is sufficient to make it work on FreeBSD.
2015-10-06 22:28:30 +02:00
Eelco Dolstra
8bdff8c100 Merge branch 'cygwin-master' of https://github.com/ternaris/nix 2014-12-14 01:49:14 +01:00
Eelco Dolstra
14955c297d Merge commit '36c67860363c93eb00cf5b8e2ad34f6f775e6901' 2014-12-14 01:47:06 +01:00
Marko Durkovic
4872677ffa Fix library handling on Cygwin
1. Shared lib extension is .dll
2. Shared libs are installed to $(prefix)/bin
3. Linker does not support -z flag
2014-12-09 13:00:59 +01:00
Marko Durkovic
936f68668c Set custom compiler flags on Cygwin 2014-12-09 13:00:59 +01:00
Eelco Dolstra
c93690a68a Merge commit '2aa93858afee22e0c32d8f4366970976374091ac' 2014-08-20 18:44:26 +02:00
Eelco Dolstra
daa16cca11 Sync with make-rules repo 2014-04-03 17:37:14 +02:00
Eelco Dolstra
764d90597a Merge commit 'a210c995cdd9279ed4137ec5d2e4cc928cb36097' 2014-02-07 16:27:34 +01:00
Eelco Dolstra
4ee6001f95 GNU Make 3.81 compatibility
3.81 doesn't understand the ‘define foo =’ syntax, which was added in
3.82.  So use ‘define foo’ instead.
2014-02-04 11:21:13 +01:00
Eelco Dolstra
73a775f3b7 Merge commit '8468806552d6730abec6431c42b5b0e897c0222c' 2014-02-03 19:57:02 +01:00
Eelco Dolstra
b6465ae5d3 Merge commit '28dc4883356a50f2805a3e3c819a541c44a4ff0a' into make 2014-02-01 15:37:59 +01:00
Eelco Dolstra
74ca70da3a Add 'mk/' from commit '1eff3ad37fdb9dcf9f8528fdacea0ebf0e79d545'
git-subtree-dir: mk
git-subtree-mainline: 6ef32bddc1
git-subtree-split: 1eff3ad37f
2014-02-01 14:38:28 +01:00
Eelco Dolstra
568b1b0a8a Remove mk subdirectory in preparation for "git subtree" 2014-01-09 16:15:16 +01:00
Eelco Dolstra
55c9a40613 Move stuff to top-level
This makes it easier to use with "git subtree".
2014-01-09 16:12:02 +01:00
Eelco Dolstra
259086de84 Add support for building JARs from Java sources 2013-12-18 16:40:48 +01:00
Eelco Dolstra
99ed25accf Add a function for doing recursive wildcard searches
Source: http://blog.jgc.org/2011/07/gnu-make-recursive-wildcard-function.html
2013-12-18 15:01:14 +01:00
Eelco Dolstra
088552b319 Set default installation paths 2013-12-17 12:13:48 +01:00
Eelco Dolstra
e81b82a2cf make dryclean: Sort names 2013-12-16 16:51:05 +01:00
Eelco Dolstra
a630635d7f No longer interpret $(..._SOURCES) relative to $(..._DIR) 2013-12-16 16:49:41 +01:00
Eelco Dolstra
4da8046513 Don't include all *.dep files 2013-12-12 11:39:58 +01:00
Eelco Dolstra
034bbcafaf Add 'make help' 2013-12-12 11:27:47 +01:00
Eelco Dolstra
45131da736 Get rid of whitespace in $(d) 2013-12-12 11:24:03 +01:00
Eelco Dolstra
c34f3c5ba4 Handle *.cpp extension 2013-12-12 11:22:57 +01:00
Eelco Dolstra
dfcc64f556 Only provide 'make dist' if PACKAGE_NAME is set 2013-12-12 11:22:25 +01:00
Eelco Dolstra
3560f52cc4 dryclean: Show what actual files would be deleted 2013-12-12 11:22:08 +01:00
Eelco Dolstra
49a385096e Initial commit (imported from the Nix repo) 2013-12-10 15:54:34 +01:00
Eelco Dolstra
bf8b66adcf Add missing file 2013-12-04 13:41:32 -05:00
Eelco Dolstra
0202ce6b94 Add support for ‘make installcheck’ 2013-11-25 18:47:03 +01:00
Eelco Dolstra
9285f0aa2b Add a Makefile for the Perl stuff 2013-11-25 16:38:33 +00:00
Eelco Dolstra
8f08046606 Expand configure variables before writing config.status
This way, we can use config.status for generating scripts/* (without
ending up with lines like "#! /usr/bin/perl -I${libexecdir}/...").
2013-11-25 15:52:14 +00:00
Eelco Dolstra
7ce0e05ad8 Rename Makefile.new -> Makefile 2013-11-25 15:25:13 +00:00