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
cod: init at unstable-2020-09-10 #97700
Conversation
907e33d
to
72d5b77
Compare
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.
You should also use this ld flag: https://github.com/dim-an/cod/blob/953117d2174a8853ad3b8d404085ddc43b8ba86c/Makefile#L10
72d5b77
to
d8c5404
Compare
I've added the ldflags. I am unsure about the other stuff. |
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.
diff --git a/pkgs/tools/misc/cod/default.nix b/pkgs/tools/misc/cod/default.nix
index 80961ae5bbc..2eb527a1d10 100644
--- a/pkgs/tools/misc/cod/default.nix
+++ b/pkgs/tools/misc/cod/default.nix
@@ -3,24 +3,22 @@
buildGoPackage rec {
pname = "cod";
version = "unstable-2020-09-10";
- rev = "ae68da08339471dd278d6df79abbfd6fe89a10fe";
-
- goPackagePath = "cod";
+ goPackagePath = pname;
goDeps = ./deps.nix;
src = fetchFromGitHub {
owner = "dim-an";
repo = pname;
- rev = "${rev}";
+ rev = "ae68da08339471dd278d6df79abbfd6fe89a10fe";
sha256 = "1l3gn9v8dcy72f5xq9hwbkvkis0vp4dp8qyinsrii3acmhksg9v6";
};
- buildFlagsArray = [ "-ldflags=-X main.GitSha=${rev}" ];
+ buildFlagsArray = [ "-ldflags=-X main.GitSha=${src.rev}" ];
meta = with lib; {
- description = "cod is a completion daemon for bash/zsh";
- homepage = "https://github.com/dim-an/cod";
+ description = "Tool for generating Bash/Zsh autocompletions based on `--help` output";
+ homepage = src.meta.homepage;
license = licenses.asl20;
maintainers = with maintainers; [ SuperSandro2000 ];
};
d8c5404
to
fa86eb4
Compare
That is coincidence. The go package path should change in the future to allow downloading it via
|
Didn't know about that, makes sense to keep this then. One question, Is there any particular reason for not setting |
Because I forgot it 😄 |
fa86eb4
to
ca682af
Compare
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.
LGTM 👍
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.
Passes nixpkgs-review
build and --help
test.
Motivation for this change
I find the concept of cod quite interesting.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)