| Commit message (Collapse) | Author | Files | Lines |
|
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`.
|
|
|
|
|
|
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
|
|
|
|
Among other things, this will allow *2nix tools to output plain data
while still being composable with the traditional
callPackage/.override interfaces.
|
|
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
)
|
|
obsolete and ancient
|
|
* 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
|
|
|
|
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.
|
|
fix a typo
|
|
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.
|
|
|
|
For NixOS evaluation, this gives a ~21% reduction in the number of
values allocated and a ~4% speedup. It's also more readable.
|
|
|
|
|
|
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
|
|
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)
|
|
|
|
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>
|
|
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.
|
|
|
|
Pet peeve...
|
|
Likewise for propagatedBuildNativeInputs, etc. "buildNativeInputs"
sounds like an imperative rather than a noun phrase.
|
|
|
|
Use the "==" operator instead.
|
|
|
|
|
|
svn path=/nixpkgs/trunk/; revision=33266
|
|
nix-env output.
svn path=/nixpkgs/trunk/; revision=27610
|
|
svn path=/nixpkgs/branches/stdenv-updates/; revision=23608
|
|
svn path=/nixpkgs/trunk/; revision=22819
|
|
* Remove `sumTwoArgs' since it has no remaining callers.
svn path=/nixpkgs/trunk/; revision=22797
|
|
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
|
|
svn path=/nixpkgs/trunk/; revision=22428
|
|
- 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
|
|
in copySystemConfiguration
svn path=/nixpkgs/trunk/; revision=21353
|
|
propagated(Native)BuildInputs after stdenv merge
svn path=/nixpkgs/trunk/; revision=20093
|
|
svn path=/nixpkgs/trunk/; revision=20084
|
|
svn path=/nixpkgs/trunk/; revision=18987
|
|
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
|
|
svn path=/nixpkgs/trunk/; revision=18391
|
|
svn path=/nixpkgs/trunk/; revision=18390
|
|
svn path=/nixpkgs/trunk/; revision=18388
|
|
zipAttrs*.
Add recursiveUpdate functions based on zipAttrs.
svn path=/nixpkgs/trunk/; revision=17506
|
|
svn path=/nixpkgs/trunk/; revision=17406
|
|
svn path=/nixpkgs/trunk/; revision=17348
|
|
svn path=/nixpkgs/trunk/; revision=17315
|
|
- 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
|