about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/up
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-02-13 12:25:07 +0100
committerAlyssa Ross <hi@alyssa.is>2024-02-13 12:25:07 +0100
commita5e1520e4538e29ecfbd4b168306f890566d7bfd (patch)
tree28099c268b5d4b1e33c2b29f0714c45f0b961382 /nixpkgs/pkgs/by-name/up
parent822f7c15c04567fbdc27020e862ea2b70cfbf8eb (diff)
parent3560d1c8269d0091b9aae10731b5e85274b7bbc1 (diff)
downloadnixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.gz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.bz2
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.lz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.xz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.zst
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/nixos/modules/services/mail/rss2email.nix
	nixpkgs/pkgs/build-support/go/module.nix
Diffstat (limited to 'nixpkgs/pkgs/by-name/up')
-rw-r--r--nixpkgs/pkgs/by-name/up/updatecli/package.nix60
-rw-r--r--nixpkgs/pkgs/by-name/up/uplosi/package.nix22
2 files changed, 76 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/by-name/up/updatecli/package.nix b/nixpkgs/pkgs/by-name/up/updatecli/package.nix
new file mode 100644
index 000000000000..327c6b51bf81
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/up/updatecli/package.nix
@@ -0,0 +1,60 @@
+{ lib
+, go
+, buildGoModule
+, fetchFromGitHub
+, nix-update-script
+, installShellFiles
+}:
+
+buildGoModule rec {
+  pname = "updatecli";
+  version = "0.70.0";
+
+  src = fetchFromGitHub {
+    owner = "updatecli";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-MQoi/HvJqGCYzQLNsJul/7N3MXkV1X5d48InUSIWT8o=";
+  };
+
+  vendorHash = "sha256-RjyVlj66CbkQlzXkdP6ZWf+cNVjOgoPdskQefv9bNoo=";
+
+  # tests require network access
+  doCheck = false;
+
+  CGO_ENABLED = 0;
+
+  ldflags = [
+    "-s"
+    "-w"
+    "-X github.com/updatecli/updatecli/pkg/core/version.BuildTime=unknown"
+    ''-X "github.com/updatecli/updatecli/pkg/core/version.GoVersion=go version go${lib.getVersion go}"''
+    "-X github.com/updatecli/updatecli/pkg/core/version.Version=${version}"
+  ];
+
+  passthru.updateScript = nix-update-script { };
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  postInstall = ''
+    installShellCompletion --cmd updatecli \
+      --bash <($out/bin/updatecli completion bash) \
+      --fish <($out/bin/updatecli completion fish) \
+      --zsh <($out/bin/updatecli completion zsh)
+
+    $out/bin/updatecli man > updatecli.1
+    installManPage updatecli.1
+  '';
+
+  meta = with lib; {
+    description = "A Declarative Dependency Management tool";
+    longDescription = ''
+      Updatecli is a command-line tool used to define and apply update strategies.
+    '';
+    homepage = "https://www.updatecli.io";
+    changelog = "https://github.com/updatecli/updatecli/releases/tag/v${version}";
+    license = licenses.asl20;
+    mainProgram = "updatecli";
+    maintainers = with maintainers; [ croissong ];
+  };
+}
diff --git a/nixpkgs/pkgs/by-name/up/uplosi/package.nix b/nixpkgs/pkgs/by-name/up/uplosi/package.nix
index 05e38ca8026c..57d7fab92ec7 100644
--- a/nixpkgs/pkgs/by-name/up/uplosi/package.nix
+++ b/nixpkgs/pkgs/by-name/up/uplosi/package.nix
@@ -1,24 +1,34 @@
 { lib
 , fetchFromGitHub
-, buildGo121Module
+, buildGoModule
+, installShellFiles
 }:
-buildGo121Module rec {
+buildGoModule rec {
   pname = "uplosi";
-  version = "0.1.2";
+  version = "0.1.3";
 
   src = fetchFromGitHub {
     owner = "edgelesssys";
     repo = pname;
     rev = "v${version}";
-    hash = "sha256-9hOeKnjH6r3CPQSe6fQ6PXlVPEJ9NiyXvp5N1krG2XA=";
+    hash = "sha256-RqjaI/1Sx36JfpvnLblt8hPfgSral3Gvp8M6BshKVwo=";
   };
 
-  vendorHash = "sha256-RsjUPLe8omoN+XGyNhHDxzNfZR7VVTkh/f/On1oCRqM=";
+  vendorHash = "sha256-eZ0/piSxMUC1ZM7qBhFW40l9p8ZPMIj1HyrS2Dy4wJQ=";
 
   CGO_ENABLED = "0";
-  ldflags = [ "-s" "-w" "-buildid=" "-X main.version=${version}" ];
+  ldflags = [ "-s" "-w" "-X main.version=${version}" ];
   flags = [ "-trimpath" ];
 
+  nativeBuildInputs = [ installShellFiles ];
+
+  postInstall = ''
+    installShellCompletion --cmd uplosi \
+      --bash <($out/bin/uplosi completion bash) \
+      --fish <($out/bin/uplosi completion fish) \
+      --zsh <($out/bin/uplosi completion zsh)
+  '';
+
   meta = with lib; {
     description = "Upload OS images to cloud provider";
     homepage = "https://github.com/edgelesssys/uplosi";