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
loccount: init #24106
loccount: init #24106
Conversation
@calvertvl, thanks for your PR! By analyzing the history of the files in this pull request, we identified @zimbatm, @zraexy and @peti to be potential reviewers. |
goPackagePath = "gitlab.com/esr/loccount"; | ||
excludedPackages = "tests"; | ||
|
||
src = fetchgit { |
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.
Please use fetchFromGitLab
here unless this git repo has submodules. Also set rev=version;
, where version = "1.0";
(see: https://gitlab.com/esr/loccount/tags)
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.
where are these fetch commands defined? I tried to find this one but could not...
EDIT: I found them in all_packages.nix, but is there a way to generate a cheatsheet for these? it'd be very useful for all maintainers
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.
so far only fetchFromGitHub
is documented here: https://nixos.org/nixpkgs/manual/#idm140737317581056
You can use nix-repl
:
nix-repl
Welcome to Nix version 1.11.7. Type :? for help.
nix-repl> :l <nixpkgs>
Added 7311 variables.
nix-repl> fetch<TAB>
fetchFromBitbucket fetchFromSavannah fetchTarball fetchcvs fetchgit fetchgx fetchpatch fetchurl
fetchFromGitHub fetchHex fetchadc fetchdarcs fetchgitLocal fetchhg fetchsvn fetchurlBoot
fetchFromGitLab fetchMavenArtifact fetchbower fetchegg fetchgitPrivate fetchmail fetchsvnrevision fetchzip
fetchFromRepoOrCz fetchNuGet fetchbzr fetchfossil fetchgitrevision fetchmtn fetchsvnssh
buildGoPackage rec { | ||
name = "loccount-${version}"; | ||
version = "20170213-${stdenv.lib.strings.substring 0 7 rev}"; | ||
rev = "7c45bc55394cd065f6a966110f5f8c3478998e95"; # 1.0 release |
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.
Please set version = "1.0";
and remove rev
Thanks! |
Motivation for this change
loccount is a higher-performance tool equivalent to sloccount; it produces comparable results in less time.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)