mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
53 lines
1.3 KiB
Nix
53 lines
1.3 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "doc2go";
|
|
version = "0.8.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "abhinav";
|
|
repo = "doc2go";
|
|
rev = "v${version}";
|
|
hash = "sha256-b4L20/9jm+bFGdNsHmcwSnzcmr3Il9XoV20284Ba8PU=";
|
|
};
|
|
vendorHash = "sha256-d5ZRMFi7GIfDHsYRNvMnDdfnGhTM1sA0WDYD2aDoEd0=";
|
|
|
|
ldflags = [ "-s" "-w" "-X main._version=${version}" ];
|
|
|
|
subPackages = [ "." ];
|
|
# integration is it's own module
|
|
excludedPackages = [ "integration" ];
|
|
|
|
checkFlags = [
|
|
# needs to fetch additional go modules
|
|
"-skip=TestFinder_ImportedPackage/Modules"
|
|
];
|
|
|
|
preCheck = ''
|
|
# run all tests
|
|
unset subPackages
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/abhinav/doc2go";
|
|
changelog = "https://github.com/abhinav/doc2go/blob/${src.rev}/CHANGELOG.md";
|
|
description = "Your Go project's documentation, to-go";
|
|
mainProgram = "doc2go";
|
|
longDescription = ''
|
|
doc2go is a command line tool that generates static HTML documentation
|
|
from your Go code. It is a self-hosted static alternative to
|
|
https://pkg.go.dev/ and https://godocs.io/.
|
|
'';
|
|
license = with licenses; [
|
|
# general project license
|
|
asl20
|
|
# internal/godoc/synopsis*.go adapted from golang source
|
|
bsd3
|
|
];
|
|
maintainers = with maintainers; [ jk ];
|
|
};
|
|
}
|