mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 15:13:46 +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.
38 lines
1.1 KiB
Nix
38 lines
1.1 KiB
Nix
{ lib, fetchFromGitHub, buildGoModule, stdenv, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "weave-gitops";
|
|
version = "0.38.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "weaveworks";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-Gm4DIQK8T+dTwB5swdrD+SjGgy/wFQ/fJYdSqNDSy9c=";
|
|
};
|
|
|
|
ldflags = [ "-s" "-w" "-X github.com/weaveworks/weave-gitops/cmd/gitops/version.Version=${version}" ];
|
|
|
|
vendorHash = "sha256-RiPBlpEQ69fhVf3B0qHQ+zEtPIet/Y/Jp/HfaTrIssE=";
|
|
|
|
subPackages = [ "cmd/gitops" ];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd gitops \
|
|
--bash <($out/bin/gitops completion bash 2>/dev/null) \
|
|
--fish <($out/bin/gitops completion fish 2>/dev/null) \
|
|
--zsh <($out/bin/gitops completion zsh 2>/dev/null)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://docs.gitops.weave.works";
|
|
description = "Weave Gitops CLI";
|
|
license = licenses.mpl20;
|
|
platforms = platforms.linux;
|
|
maintainers = [ ];
|
|
mainProgram = "gitops";
|
|
};
|
|
}
|