Skip to content
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

Merged
merged 1 commit into from Mar 22, 2017
Merged

loccount: init #24106

merged 1 commit into from Mar 22, 2017

Conversation

calvertvl
Copy link
Contributor

Motivation for this change

loccount is a higher-performance tool equivalent to sloccount; it produces comparable results in less time.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@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 {
Copy link
Member

@Mic92 Mic92 Mar 21, 2017

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)

Copy link
Contributor Author

@calvertvl calvertvl Mar 21, 2017

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

Copy link
Member

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
Copy link
Member

@Mic92 Mic92 Mar 21, 2017

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

@Mic92 Mic92 merged commit 2793a6c into NixOS:master Mar 22, 2017
@Mic92
Copy link
Member

Mic92 commented Mar 22, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants