Commit graph

14 commits

Author SHA1 Message Date
Tuomas Tynkkynen 9275c3387e lib.cleanSourceFilter: Fix VIM swap file filtering
The backslash wasn't properly escaped, and "\." is apparently equal to
".". So it's accidentally filtering out these valid file names (in
Nixpkgs):

trace: excluding clfswm
trace: excluding larswm
trace: excluding mkpasswd

While at it, turn the file filter stricter to what it was before
e2589b3ca2. That is, the file name must
start with a dot: '.swp', '.foo.swo' are filtered but 'bar.swf' is not.
2017-09-12 14:58:46 +03:00
Dan Peebles e2589b3ca2 Deduplicate some filterSource invocations
This version should have more conventional regexes that work across many
platforms and regex engines. This is an issue because up until Nix 1.11,
Nix called out to the libc regex matcher, which behaved differently on
Darwin and Linux. And in Nix 1.12, we're moving to std::regex which will
also behave differently here.

And yes, I do actually evaluate make-disk-image.nix on Darwin ;)
2017-08-29 20:27:04 -04:00
Tom Hunger cb96ed615e lib: Add a function to filter sources by regular expressions. 2017-02-17 18:56:39 +00:00
Elliot Cameron 402c07c563 Expose guts of cleanSource
Ref #20511
2016-11-17 22:21:18 -05:00
obadz f242b752fe lib/sources.nix@commitIdFromGitRepo: parenthesize what should always have been
Fixes error: cannot coerce a partially applied built-in function to a string, at lib/sources.nix:59:32

I don't understand how this used to work, but doesn't work anymore?
2016-08-08 11:46:41 +01:00
Domen Kožar 39e689e316 cleanSource: filter out also nix result symlinks (#16120) 2016-08-06 19:53:18 +01:00
Eric Sagnes 85d8b01660 lib: refactor commitIdFromGitRepo with fileContents 2016-08-01 18:35:26 +09:00
obadz fee334f672 lib/sources.nix@commitIdFromGitRepo: remove use of lib.splitString
lib.splitString was blowing up the stack in instances where the
.git/packed-refs file was too large. We now use a regexp over the
whole file instead.

Closes #16570
2016-07-27 15:47:08 +01:00
obadz 4c5fdf42ed nixos/modules/misc/version.nix: check that .git is a directory
That's not the case for git submodules
Fixes #15928
2016-06-03 13:38:41 +01:00
obadz 47950b5353 modules/misc/version.nix: populate nixosRevision based on <nixpkgs/.git> when possible (#15624)
Example:

$ nixos-option system.nixosLabel
Value:
"16.09.git.4643ca1"
2016-05-24 23:34:28 +01:00
Eelco Dolstra b1ce3cc172 Manual: Handle XML files in subdirectories 2014-08-25 14:33:33 +02:00
Eelco Dolstra de9ed78ab2 cleanSources: Filter *.o and *.so 2014-02-06 12:30:26 +01:00
Eelco Dolstra 34638ebc1e cleanSource: Support Mercurial 2014-02-03 23:44:11 +01:00
Eelco Dolstra 5fef92c4a0 Move pkgs/lib/ to lib/ 2013-10-10 13:28:21 +02:00
Renamed from pkgs/lib/sources.nix (Browse further)