New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nix-gitignore: init at v3.0.0 #46112
Conversation
Could we move this to lib? |
I can move it wherever advised. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please document more what the code does and how it is supposed to be used?
|
||
let | ||
debug = a: trace a a; | ||
tail = l: elemAt l ((length l) - 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As there is a tail
function in builtins
already, I recommend that you use a different name to make the code easier to read.
There's a README in the project's original page. Could that be reused here
or should that go to to the XML docs?
It doesn't yet include the explanation of "what for", only the "how".
P.S. I initially wanted this to be merely another fetched package, but now
I understand why import-from-derivation isn't desirable.
…On Thu., 6 Sep. 2018, 5:05 pm Servilio Afre Puentes, < ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Can you please document more what the code does and how it is supposed to
be used?
------------------------------
In pkgs/build-support/nix-gitignore/default.nix
<#46112 (comment)>:
> @@ -0,0 +1,113 @@
+{ lib }:
+
+# An interesting bit from the gitignore(5):
+# - A slash followed by two consecutive asterisks then a slash matches
+# - zero or more directories. For example, "a/**/b" matches "a/b",
+# - "a/x/b", "a/x/y/b" and so on.
+
+with builtins;
+
+let
+ debug = a: trace a a;
+ tail = l: elemAt l ((length l) - 1);
As there is a tail function in builtins already, I recommend that you use
a different name to make the code easier to read.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#46112 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAOWixYmMJWKG_KRZl7X-9Lc2mesbU_kks5uYSvEgaJpZM4WbdAI>
.
|
e1ccbfb
to
f2156d5
Compare
@afrepues Hi, in the latest version
|
Much better! My thoughts: Though I can see the usefulness of having a References to the original repository should be removed. |
|
The documentation doesn't convey it for me. I can see the value of a filter that uses
Are you talking about the references? If the code is already in this repository, access to this repository alone should suffice to use it. Mainly the examples need to be reworked to show the code already working as living in this repository. |
|
|
What about the test code? Are you interested in having that lying around as well? |
f2156d5
to
9107799
Compare
|
Hi, when might you have a chance to take a look at this? :) |
This is very useful. There is often a nice match between what should be ignored by source control and some of the cruft in a directory. This prevents superfluous rebuilds, just because "result" changed. I've been using this for several months. |
#nixos 2018-10-01 @zimbatm @grahamc
|
I've added the docs with an include of
Thanks. |
I can't believe I finally did it and that finally happened! Thanks @zimbatm! 🎊 🎉 |
🎉 :) |
thanks for your patience :) |
Motivation for this change
A user in siers/nix-gitignore#6 requested this to be merged into nixpkgs somehow and I'd gladly try to arrange it.
Questions
elvishjerricco
on IRC mentioned that I mustn't use the "import from fetchGitHub" approach, so I included it directly.meta
section, if this isn't a derivation?