nixpkgs/pkgs/by-name/fe/fetchit/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
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-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

87 lines
2.4 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
lvm2,
pkg-config,
}:
buildGoModule rec {
pname = "fetchit";
version = "0.0.1";
src = fetchFromGitHub {
owner = "containers";
repo = "fetchit";
rev = "v${version}";
sha256 = "sha256-hxS/+/fbYOpMJ5VfvvG5l7wWKBUUR22rYn9X79DzUUk=";
};
vendorHash = "sha256-SyPd8P9s8R2YbGEPqFeztF98W1QyGSBumtirSdpm8VI=";
subPackages = [ "cmd/fetchit" ];
nativeBuildInputs = [
pkg-config
installShellFiles
];
buildInputs = [ lvm2 ];
# Flags are derived from
# https://github.com/containers/fetchit/blob/v0.0.1/Makefile#L20-L29
ldflags = [
"-X k8s.io/client-go/pkg/version.gitMajor=0"
"-X k8s.io/client-go/pkg/version.gitMinor=0"
"-X k8s.io/client-go/pkg/version.gitTreeState=clean"
"-X k8s.io/client-go/pkg/version.gitVersion=v0.0.0"
"-X k8s.io/component-base/version.gitMajor=0"
"-X k8s.io/component-base/version.gitMajor=0"
"-X k8s.io/component-base/version.gitMinor=0"
"-X k8s.io/component-base/version.gitTreeState=clean"
"-X k8s.io/component-base/version.gitVersion=v0.0.0"
"-s"
"-w"
];
tags = [
"containers_image_openpgp"
"exclude_graphdriver_btrfs"
"gssapi"
"include_gcs"
"include_oss"
"netgo"
"osusergo"
"providerless"
];
# There are no tests for cmd/fetchit.
doCheck = false;
postInstall = ''
for i in bash fish zsh; do
installShellCompletion --cmd fetchit \
--$i <($out/bin/fetchit completion $i)
done
'';
meta = with lib; {
description = "Tool to manage the life cycle and configuration of Podman containers";
mainProgram = "fetchit";
longDescription = ''
FetchIt allows for a GitOps based approach to manage containers running on
a single host or multiple hosts based on a git repository. This allows for
us to deploy a new host and provide the host a configuration value for
FetchIt and automatically any containers defined in the git repository and
branch will be deployed onto the host. This can be beneficial for
environments that do not require the complexity of Kubernetes to manage
the containers running on the host.
'';
homepage = "https://fetchit.readthedocs.io";
changelog = "https://github.com/containers/fetchit/releases/tag/${src.rev}";
license = licenses.agpl3Plus;
maintainers = with maintainers; [ azahi ];
platforms = platforms.linux;
};
}