aboutsummaryrefslogtreecommitdiff
path: root/lib/deprecated.nix (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-05-11lib.fake{Sri => Hash}: fix and renameEmily1-1/+1
The previous hash was too short and caused evaluation-time errors like: invalid SRI hash 'sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=' Additionally, since the fact that this is broken implies that nobody could have been using it, "SRI" is a bit of a vague and obscure term, `fakeSriHash` would be somewhat of a mouthful, and the relevant fetcher parameters are just called `hash`, rename it to `fakeHash`.
2020-04-05lib: add shortcut for fake SRI hashTony Olagbaiye1-0/+1
2019-08-28treewide: remove redundant recvolth1-1/+1
2019-01-10lib: add shortcuts for fake hashes (fakeSha256, fakeSha512)danbst1-0/+4
Fake hashes can be used as placeholders for all the places, where Nix expression requires a hash, but we don't yet have one. This should be more convenient than following: - echo|sha256sum, copy into clipboard, go to editor, paste into previously edited place - search nixpkgs for a random package, copy it's hash to cliboard, go to editor, paste into previously edited place Nix can add support for these fake hashes. In that case printed error should contain only 1 hash, so no more problem "which of two hashes from error should I use?" Idea by irc:Synthetica
2018-12-30Remove composableDerivation, closes #18763Frederik Rietdijk1-121/+1
2018-01-31Add setFunctionArgs lib function.Shea Levy1-4/+4
Among other things, this will allow *2nix tools to output plain data while still being composable with the traditional callPackage/.override interfaces.
2017-09-16Convert libs to a fixed-pointGraham Christensen1-4/+5
This does break the API of being able to import any lib file and get its libs, however I'm not sure people did this. I made this while exploring being able to swap out docFn with a stub in #2305, to avoid functor performance problems. I don't know if that is going to move forward (or if it is a problem or not,) but after doing all this work figured I'd put it up anyway :) Two notable advantages to this approach: 1. when a lib inherits another lib's functions, it doesn't automatically get put in to the scope of lib 2. when a lib implements a new obscure functions, it doesn't automatically get put in to the scope of lib Using the test script (later in this commit) I got the following diff on the API: + diff master fixed-lib 11764a11765,11766 > .types.defaultFunctor > .types.defaultTypeMerge 11774a11777,11778 > .types.isOptionType > .types.isType 11781a11786 > .types.mkOptionType 11788a11794 > .types.setType 11795a11802 > .types.types This means that this commit _adds_ to the API, however I can't find a way to fix these last remaining discrepancies. At least none are _removed_. Test script (run with nix-repl in the PATH): #!/bin/sh set -eux repl() { suff=${1:-} echo "(import ./lib)$suff" \ | nix-repl 2>&1 } attrs_to_check() { repl "${1:-}" \ | tr ';' $'\n' \ | grep "\.\.\." \ | cut -d' ' -f2 \ | sed -e "s/^/${1:-}./" \ | sort } summ() { repl "${1:-}" \ | tr ' ' $'\n' \ | sort \ | uniq } deep_summ() { suff="${1:-}" depth="${2:-4}" depth=$((depth - 1)) summ "$suff" for attr in $(attrs_to_check "$suff" | grep -v "types.types"); do if [ $depth -eq 0 ]; then summ "$attr" | sed -e "s/^/$attr./" else deep_summ "$attr" "$depth" | sed -e "s/^/$attr./" fi done } ( cd nixpkgs #git add . #git commit -m "Auto-commit, sorry" || true git checkout fixed-lib deep_summ > ../fixed-lib git checkout master deep_summ > ../master ) if diff master fixed-lib; then echo "SHALLOW MATCH!" fi ( cd nixpkgs git checkout fixed-lib repl .types )
2017-08-11mergeAttrsByVersion, versionedDerivation: removeRobin Gloster1-42/+0
obsolete and ancient
2017-07-04lib: introduce imap0, imap1 (#25543)zimbatm1-0/+8
* lib: introduce imap0, imap1 For historical reasons, imap starts counting at 1 and it's not consistent with the rest of the lib. So for now we split imap into imap0 that starts counting at zero and imap1 that starts counting at 1. And imap is marked as deprecated. See https://github.com/NixOS/nixpkgs/commit/c71e2d42359f9900ea2c290d141c0d606471da16#commitcomment-21873221 * replace uses of lib.imap * lib: move imap to deprecated.nix
2017-04-19lib: trivial spelling fixesTom Saeger1-2/+2
2017-03-11lib: fix mixed tab/space indents, trailing whitespace, etcBenjamin Staffin1-88/+91
Nix style seems to have settled on not using spaces between bound variable names and the lambda : so I also tried to make those somewhat more consistent throughout.
2015-11-15Update deprecated.nixWei-Ming Yang1-1/+1
fix a typo
2015-07-28Remove deepOverrideEelco Dolstra1-1/+0
It's unused, and also a bad idea: because it recursively recomputes every function argument and there is no sharing, you can get an exponential (?) blowup in evaluation time. For example, evaluating ‘linuxPackages.kernel’ takes 0.09s and ~13 MiB, but evaluating ‘linuxPackages.kernel.deepOverride {}’ takes 3.6s and ~305 MiB.
2015-07-23Rename misc.nix -> deprecated.nixEelco Dolstra1-2/+0
2014-10-05Replace hasAttr/getAttr calls with the ? and . operatorsEelco Dolstra1-24/+21
For NixOS evaluation, this gives a ~21% reduction in the number of values allocated and a ~4% speedup. It's also more readable.
2013-10-24Small cleanupEelco Dolstra1-3/+1
2013-10-10Move pkgs/lib/ to lib/Eelco Dolstra1-0/+0
2013-05-29ReRevert Merge x-updates into masterVladimír Čunát1-1/+4
This reverts commit ec3965d8d0b5594a9db11e6c9cd1c28d36e91cde. Conflicts (taken x-updates): pkgs/development/libraries/libgcrypt/default.nix pkgs/development/libraries/libgpg-error/default.nix pkgs/development/libraries/poppler/default.nix
2013-05-09Revert Merge x-updates into master due to mesa bloatVladimír Čunát1-4/+1
See #490 discussion. This reverts commit 1278859d3167b9f84bfab680d9c8c463adf64a60, reversing changes made to 0c020c98f9d4f49d5c9907db5f4b35aac7df959b. Conflicts: pkgs/desktops/xfce/core/xfce4-session.nix (take master) pkgs/lib/misc.nix (auto)
2013-05-08add versionedDerivationMarc Weber1-3/+8
2013-05-08experimental/multiple-versions-in-one-fileMarc Weber1-0/+34
This patch introduces mergeAttrsByVersion to lib. In some cases it does make sense to keep "experimental" and "older" versions of the same package in one file because it follows the "do it once only" principle. Very often many versions share their build instructions - so even though I understand Eelcos opinion that different versions should be put into their own .nix files - its my feeling telling me that this is fastest for most cases. I agree with Eelco that if tweaks for individual versions become too much they should be split into individual files. See comments above mergeAttrsByVersion learn about its usage. Signed-off-by: Marc Weber <marco-oweber@gmx.de>
2013-04-21poppler: share most things between glib and qt4 versionsVladimír Čunát1-1/+2
Most of the stuff was duplicated (headers, the core library). The new solution makes the _qt4 package use the _glib one, because it depended on glib through cairo anyway (and _glib bindings themselves are just ~350kB). This also fixes a problem that mergeAttrsByFuncDefaultsClean didn't merge patches, which affected dbus.libs.
2013-04-11dbus: minor update, reorganize and polish the expressionVladimír Čunát1-0/+2
2012-12-28Remove unnecessary parentheses around if conditionsEelco Dolstra1-8/+8
Pet peeve...
2012-12-28Rename buildNativeInputs -> nativeBuildInputsEelco Dolstra1-2/+2
Likewise for propagatedBuildNativeInputs, etc. "buildNativeInputs" sounds like an imperative rather than a noun phrase.
2012-08-13Remove obsolete flattenAttrs functionEelco Dolstra1-5/+1
2012-08-13Remove obsolete eqStrict functionEelco Dolstra1-14/+0
Use the "==" operator instead.
2012-07-18Fix bug in uniqList.Andres Loeh1-1/+1
2012-07-18Try to cut recursion depth in uniqList and closePropagation.Andres Loeh1-18/+25
2012-03-19* Remove unused function "checker".Eelco Dolstra1-11/+0
svn path=/nixpkgs/trunk/; revision=33266
2011-07-05* Disable the trace message "not an attrSet" because it shows up inEelco Dolstra1-1/+1
nix-env output. svn path=/nixpkgs/trunk/; revision=27610
2010-09-03Adding a list-in-list checker for builderDefs closePropagationMichael Raskin1-5/+9
svn path=/nixpkgs/branches/stdenv-updates/; revision=23608
2010-07-30* Move "checker" to lib. It seems to be unused though.Eelco Dolstra1-0/+12
svn path=/nixpkgs/trunk/; revision=22819
2010-07-28* Remove `customKernel' which is obsolete as far as I can tell.Eelco Dolstra1-2/+0
* Remove `sumTwoArgs' since it has no remaining callers. svn path=/nixpkgs/trunk/; revision=22797
2010-07-08Make WebKit use libsoup 2.31.2 via deepOverride. Edit a few packages that ↵Michael Raskin1-44/+55
were overridable but did not allow extra arguments. Remove a catch with deepOverride that pkgs.lib had this attribute in a different sense. svn path=/nixpkgs/trunk/; revision=22529
2010-06-29Adding Redstore HTTP RDF/SPARQL serverMichael Raskin1-2/+7
svn path=/nixpkgs/trunk/; revision=22428
2010-05-26psotgis:Marc Weber1-1/+1
- support older versions (which are used by other distributions) - give utilyt scripts nicer names - pg_db_postgis_enable: support loading comments svn path=/nixpkgs/trunk/; revision=21992
2010-04-27adding maybeEnv. This will replace from-env.nix in nixos and will be reused ↵Marc Weber1-0/+5
in copySystemConfiguration svn path=/nixpkgs/trunk/; revision=21353
2010-02-18Update SGT puzzles and improve builderDefs processing of ↵Michael Raskin1-4/+5
propagated(Native)BuildInputs after stdenv merge svn path=/nixpkgs/trunk/; revision=20093
2010-02-18fix vim_configurableMarc Weber1-1/+1
svn path=/nixpkgs/trunk/; revision=20084
2009-12-16remove mapRecordFlatten & fix source autofsMarc Weber1-1/+0
svn path=/nixpkgs/trunk/; revision=18987
2009-11-22nix lib: add nixType returning type of value as string which is used inMarc Weber1-6/+19
eqStrict now to return false when a b have different types. Passing string and {} to eqStrict caused coercion failures when running tests previously svn path=/nixpkgs/trunk/; revision=18539
2009-11-17* Another unused function.Eelco Dolstra1-6/+0
svn path=/nixpkgs/trunk/; revision=18391
2009-11-17* Remove some more unused functions.Eelco Dolstra1-8/+0
svn path=/nixpkgs/trunk/; revision=18390
2009-11-17* Remove sumArgs and its few remaining uses. Idem for composedArgs.Eelco Dolstra1-17/+0
svn path=/nixpkgs/trunk/; revision=18388
2009-09-29Move zip & zipWithNames from misc.nix to attrsets.nix and rename them toNicolas Pierron1-14/+0
zipAttrs*. Add recursiveUpdate functions based on zipAttrs. svn path=/nixpkgs/trunk/; revision=17506
2009-09-24fix mergeAttrsWithFunc (also merge in names which are only in the snd attrs)Marc Weber1-1/+1
svn path=/nixpkgs/trunk/; revision=17406
2009-09-22* Typos.Eelco Dolstra1-2/+2
svn path=/nixpkgs/trunk/; revision=17348
2009-09-20rename mapRecordFlatten to mapAttrsFlattenMarc Weber1-2/+2
svn path=/nixpkgs/trunk/; revision=17315
2009-09-15Replace the traversal of modules:Nicolas Pierron1-2/+4
- Remove handleOptionSets which used option declarations & definitions in the same set. - Add a traversal of modules where "config" and "options" are traverse at the same time. This allow to have accruate error messages with the incriminated files playing a role in the error. This system add a new restriction compare to the previous system: - A module with no structure (option definitions & option declarations & require) should not contain any option declarations. If such module exists you must convert it to the following form: { imports = <content of the require attribute>; options = <set of option declarations>; config = <set of option definitions>; } svn path=/nixpkgs/trunk/; revision=17163