mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-15 17:34:04 +00:00
![Silvan Mosberger](/assets/img/avatar_default.png)
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
69 lines
1.5 KiB
Nix
69 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
testers,
|
|
oras,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "oras";
|
|
version = "1.2.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "oras-project";
|
|
repo = "oras";
|
|
rev = "v${version}";
|
|
hash = "sha256-M9YQUQHMt+CsTp/zDsPM2mwaUGYwjgBW1RY6j5jpYDk=";
|
|
};
|
|
|
|
vendorHash = "sha256-I1iFayzNcU2K8YMTfMFU0PEZAjKGhCuJLEi7cwy/XW0=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
excludedPackages = [ "./test/e2e" ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X oras.land/oras/internal/version.Version=${version}"
|
|
"-X oras.land/oras/internal/version.BuildMetadata="
|
|
"-X oras.land/oras/internal/version.GitTreeState=clean"
|
|
];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd oras \
|
|
--bash <($out/bin/oras completion bash) \
|
|
--fish <($out/bin/oras completion fish) \
|
|
--zsh <($out/bin/oras completion zsh)
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
installCheckPhase = ''
|
|
runHook preInstallCheck
|
|
|
|
$out/bin/oras --help
|
|
$out/bin/oras version | grep "${version}"
|
|
|
|
runHook postInstallCheck
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = oras;
|
|
command = "oras version";
|
|
};
|
|
|
|
meta = with lib; {
|
|
homepage = "https://oras.land/";
|
|
changelog = "https://github.com/oras-project/oras/releases/tag/v${version}";
|
|
description = "ORAS project provides a way to push and pull OCI Artifacts to and from OCI Registries";
|
|
mainProgram = "oras";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [
|
|
jk
|
|
developer-guy
|
|
];
|
|
};
|
|
}
|