Commit graph

63 commits

Author SHA1 Message Date
Dan Peebles 4dfdb27e00 lib.{warn, info}: add simple helpers
See also https://github.com/NixOS/nix/issues/749.
2016-08-15 13:54:23 -04:00
Vladimír Čunát d4de02c46e treewide: change $IN_NIX_SHELL handling
... to be compatible with https://github.com/NixOS/nix/pull/933
while not breaking compatibility with current nix.
2016-08-11 16:40:44 +02:00
Eric Sagnes e276842f6a lib: refactor nixpkgsVersion with fileContents 2016-08-01 18:35:26 +09:00
zimbatm 22d7c08dc5 lib.trivial: add a new importJSON function
This is meant to be used by packages who often re-generate their inputs.

Producing valid JSON is easier than nix, and also garantees it's purity.
2016-02-29 11:21:56 +00:00
Peter Simons 89a5717c7a lib/trivial.nix: improve spelling 2015-11-25 11:30:43 +01:00
Peter Simons 405fda497a lib: document fix and add fix', extends functions
These functions used to live in pkgs/development/haskell-modules/default.nix,
but they are generic, really, and should be easily accessible to everyone.
2015-11-24 12:48:03 +01:00
Eelco Dolstra 0ae8b365b3 Rename misc.nix -> deprecated.nix 2015-07-23 18:31:54 +02:00
Eelco Dolstra ef0e4d56f5 Use builtin seq/deepSeq 2015-03-20 19:29:21 +01:00
Eelco Dolstra 5d7000df68 Automatically set nix.nrBuildUsers to at least nix.maxJobs 2015-02-16 12:02:49 +01:00
Eelco Dolstra 4a91cfd32b Add a global variable ‘inNixShell’
This is primarily useful in Nix expressions that are also intended to
be used by nix-shell.  It allows saying things like:

  buildInputs = [ ... ] ++ (if inNixShell then [ emacs ] else [ ]);

This should not be used in Nixpkgs (since the question of what
constitutes a useful nix-shell environment is very subjective).
2014-02-19 19:03:16 +01:00
Eelco Dolstra 484403bf0e Add a constant ‘nixpkgsVersion’
This makes it a bit easier to find out the current Nixpkgs version,
e.g.

  $ nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion
  "14.02.35657.66f51a9"
2014-02-19 19:03:16 +01:00
Eelco Dolstra 785eaf2cea Add some primops to lib 2013-11-12 13:48:30 +01:00
Eelco Dolstra 5fef92c4a0 Move pkgs/lib/ to lib/ 2013-10-10 13:28:21 +02:00
Renamed from pkgs/lib/trivial.nix (Browse further)