Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 installShellFiles, 6 lvm2, 7 pkg-config, 8}: 9 10buildGoModule rec { 11 pname = "fetchit"; 12 version = "0.0.1"; 13 14 src = fetchFromGitHub { 15 owner = "containers"; 16 repo = "fetchit"; 17 rev = "v${version}"; 18 sha256 = "sha256-hxS/+/fbYOpMJ5VfvvG5l7wWKBUUR22rYn9X79DzUUk="; 19 }; 20 21 vendorHash = "sha256-SyPd8P9s8R2YbGEPqFeztF98W1QyGSBumtirSdpm8VI="; 22 23 subPackages = [ "cmd/fetchit" ]; 24 25 nativeBuildInputs = [ 26 pkg-config 27 installShellFiles 28 ]; 29 buildInputs = [ lvm2 ]; 30 31 # Flags are derived from 32 # https://github.com/containers/fetchit/blob/v0.0.1/Makefile#L20-L29 33 ldflags = [ 34 "-X k8s.io/client-go/pkg/version.gitMajor=0" 35 "-X k8s.io/client-go/pkg/version.gitMinor=0" 36 "-X k8s.io/client-go/pkg/version.gitTreeState=clean" 37 "-X k8s.io/client-go/pkg/version.gitVersion=v0.0.0" 38 "-X k8s.io/component-base/version.gitMajor=0" 39 "-X k8s.io/component-base/version.gitMajor=0" 40 "-X k8s.io/component-base/version.gitMinor=0" 41 "-X k8s.io/component-base/version.gitTreeState=clean" 42 "-X k8s.io/component-base/version.gitVersion=v0.0.0" 43 "-s" 44 "-w" 45 ]; 46 47 tags = [ 48 "containers_image_openpgp" 49 "exclude_graphdriver_btrfs" 50 "gssapi" 51 "include_gcs" 52 "include_oss" 53 "netgo" 54 "osusergo" 55 "providerless" 56 ]; 57 58 # There are no tests for cmd/fetchit. 59 doCheck = false; 60 61 postInstall = '' 62 for i in bash fish zsh; do 63 installShellCompletion --cmd fetchit \ 64 --$i <($out/bin/fetchit completion $i) 65 done 66 ''; 67 68 meta = with lib; { 69 description = "Tool to manage the life cycle and configuration of Podman containers"; 70 mainProgram = "fetchit"; 71 longDescription = '' 72 FetchIt allows for a GitOps based approach to manage containers running on 73 a single host or multiple hosts based on a git repository. This allows for 74 us to deploy a new host and provide the host a configuration value for 75 FetchIt and automatically any containers defined in the git repository and 76 branch will be deployed onto the host. This can be beneficial for 77 environments that do not require the complexity of Kubernetes to manage 78 the containers running on the host. 79 ''; 80 homepage = "https://fetchit.readthedocs.io"; 81 changelog = "https://github.com/containers/fetchit/releases/tag/${src.rev}"; 82 license = licenses.agpl3Plus; 83 maintainers = [ ]; 84 platforms = platforms.linux; 85 }; 86}