diff options
Diffstat (limited to 'pkgs/by-name/up')
-rw-r--r-- | pkgs/by-name/up/upbound/package.nix | 32 | ||||
-rw-r--r-- | pkgs/by-name/up/updatecli/package.nix | 35 | ||||
-rw-r--r-- | pkgs/by-name/up/upiano/package.nix | 3 | ||||
-rw-r--r-- | pkgs/by-name/up/uplosi/package.nix | 35 | ||||
-rw-r--r-- | pkgs/by-name/up/upower-notify/package.nix | 33 | ||||
-rw-r--r-- | pkgs/by-name/up/ups/package.nix | 24 | ||||
-rw-r--r-- | pkgs/by-name/up/upsun/package.nix | 62 | ||||
-rwxr-xr-x | pkgs/by-name/up/upsun/update.sh | 29 | ||||
-rw-r--r-- | pkgs/by-name/up/upsun/versions.json | 19 |
9 files changed, 228 insertions, 44 deletions
diff --git a/pkgs/by-name/up/upbound/package.nix b/pkgs/by-name/up/upbound/package.nix new file mode 100644 index 0000000000000..076761cf49ffd --- /dev/null +++ b/pkgs/by-name/up/upbound/package.nix @@ -0,0 +1,32 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "upbound"; + version = "0.33.0"; + + src = fetchFromGitHub { + owner = pname; + repo = "up"; + rev = "v${version}"; + hash = "sha256-PJMOR/XpWqtSIb3x61o0iLwETCHA5e07etmEZYQtzXw="; + }; + + vendorHash = "sha256-WLRXj4G49JEbQc2aFAjLLCpQrDhN94jazWxfM70hHqs="; + + subPackages = [ "cmd/docker-credential-up" "cmd/up" ]; + + ldflags = [ + "-s" + "-w" + "-X github.com/upbound/up/internal/version.version=v${version}" + ]; + + meta = with lib; { + description = + "CLI for interacting with Upbound Cloud, Upbound Enterprise, and Universal Crossplane (UXP)"; + homepage = "https://upbound.io"; + license = licenses.asl20; + maintainers = with maintainers; [ lucperkins ]; + mainProgram = "up"; + }; +} diff --git a/pkgs/by-name/up/updatecli/package.nix b/pkgs/by-name/up/updatecli/package.nix index 5427471c8229f..9695618455ba7 100644 --- a/pkgs/by-name/up/updatecli/package.nix +++ b/pkgs/by-name/up/updatecli/package.nix @@ -1,23 +1,26 @@ -{ lib -, go -, buildGoModule -, fetchFromGitHub -, nix-update-script -, installShellFiles +{ + lib, + go, + buildGoModule, + fetchFromGitHub, + nix-update-script, + installShellFiles, + testers, + updatecli, }: buildGoModule rec { pname = "updatecli"; - version = "0.76.0"; + version = "0.82.0"; src = fetchFromGitHub { owner = "updatecli"; - repo = pname; + repo = "updatecli"; rev = "v${version}"; - hash = "sha256-UfiwagyE3w+kcPJnDDNTCGrxghnag/RPz6SSdAglyYA="; + hash = "sha256-kNc+Z+v4fvuWO/Ibr9VOekMDT39YEwA/fReP+e3C74U="; }; - vendorHash = "sha256-STiVtzA78zeo5wywwzvA0dqmBW3REUvcpOXuWjpxReY="; + vendorHash = "sha256-fnx0EAGxau0+ktnuUb8ljolNAlwu2595FMjsDbM2MiY="; # tests require network access doCheck = false; @@ -32,7 +35,13 @@ buildGoModule rec { "-X github.com/updatecli/updatecli/pkg/core/version.Version=${version}" ]; - passthru.updateScript = nix-update-script { }; + passthru = { + updateScript = nix-update-script { }; + tests.version = testers.testVersion { + package = updatecli; + command = "updatecli version"; + }; + }; nativeBuildInputs = [ installShellFiles ]; @@ -47,12 +56,12 @@ buildGoModule rec { ''; meta = with lib; { - description = "A Declarative Dependency Management tool"; + description = "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}"; + changelog = "https://github.com/updatecli/updatecli/releases/tag/${src.rev}"; license = licenses.asl20; mainProgram = "updatecli"; maintainers = with maintainers; [ croissong ]; diff --git a/pkgs/by-name/up/upiano/package.nix b/pkgs/by-name/up/upiano/package.nix index 351e80f0b6d09..4ad1456fc96e9 100644 --- a/pkgs/by-name/up/upiano/package.nix +++ b/pkgs/by-name/up/upiano/package.nix @@ -23,7 +23,6 @@ python3.pkgs.buildPythonApplication rec { nativeBuildInputs = with python3.pkgs; [ poetry-core - pythonRelaxDepsHook ]; propagatedBuildInputs = with python3.pkgs; [ @@ -36,7 +35,7 @@ python3.pkgs.buildPythonApplication rec { ]; meta = with lib; { - description = "A Piano in your terminal"; + description = "Piano in your terminal"; homepage = "https://github.com/eliasdorneles/upiano"; license = licenses.mit; maintainers = with maintainers; [ figsoda ]; diff --git a/pkgs/by-name/up/uplosi/package.nix b/pkgs/by-name/up/uplosi/package.nix index f58db5625ac2c..074bf872f9876 100644 --- a/pkgs/by-name/up/uplosi/package.nix +++ b/pkgs/by-name/up/uplosi/package.nix @@ -1,23 +1,29 @@ -{ lib -, fetchFromGitHub -, buildGoModule -, installShellFiles +{ + lib, + fetchFromGitHub, + buildGoModule, + installShellFiles, + nix-update-script, }: + buildGoModule rec { pname = "uplosi"; - version = "0.2.1"; + version = "0.3.0"; src = fetchFromGitHub { owner = "edgelesssys"; repo = pname; rev = "v${version}"; - hash = "sha256-i/RVCoeQLeOaPaEtJS/l+42CVohMucA6cBBt0mdJ4uE="; + hash = "sha256-AtsFZ92WkVkH8fd0Xa0D6/PR84/dtOH6gpM4mtn32Hk="; }; - vendorHash = "sha256-f8Yz99qlN0S0Ybewifc0VQanYXKinb1togBkUwDPSvw="; + vendorHash = "sha256-o7PPgW3JL47G6Na5n9h3RasRMfU25FD1U/wCMaydRmc="; CGO_ENABLED = "0"; - ldflags = [ "-s" "-w" "-X main.version=${version}" ]; + ldflags = [ + "-s" + "-X main.version=${version}" + ]; nativeBuildInputs = [ installShellFiles ]; @@ -28,13 +34,18 @@ buildGoModule rec { --zsh <($out/bin/uplosi completion zsh) ''; - meta = with lib; { + passthru.updateScript = nix-update-script { }; + + meta = { description = "Upload OS images to cloud provider"; homepage = "https://github.com/edgelesssys/uplosi"; changelog = "https://github.com/edgelesssys/uplosi/releases/tag/v${version}"; - license = licenses.asl20; + license = lib.licenses.asl20; mainProgram = "uplosi"; - maintainers = with maintainers; [ katexochen malt3 ]; - platforms = platforms.unix; + maintainers = with lib.maintainers; [ + katexochen + malt3 + ]; + platforms = lib.platforms.unix; }; } diff --git a/pkgs/by-name/up/upower-notify/package.nix b/pkgs/by-name/up/upower-notify/package.nix new file mode 100644 index 0000000000000..f93fcce1237a2 --- /dev/null +++ b/pkgs/by-name/up/upower-notify/package.nix @@ -0,0 +1,33 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, +}: + +# To use upower-notify, the maintainer suggests adding something like this to your configuration.nix: +# +# service.xserver.displayManager.sessionCommands = '' +# ${pkgs.dunst}/bin/dunst -shrink -geometry 0x0-50-50 -key space & # ...if don't already have a dbus notification display app +# (sleep 3; exec ${pkgs.yeshup}/bin/yeshup ${pkgs.go-upower-notify}/bin/upower-notify) & +# ''; +buildGoModule { + pname = "upower-notify"; + version = "0-unstable-2024-07-20"; + + src = fetchFromGitHub { + owner = "omeid"; + repo = "upower-notify"; + rev = "c05ffbba9b8d475573be0908d75ac7c64d74be2d"; + hash = "sha256-y+Cy3jkIfWiqF2HFopafdNSyGVA2ws4250Lg02rVxmo="; + }; + + vendorHash = "sha256-58zK6t3rb+19ilaQaNgsMVFQBYKPIV40ww8klrGbpnw="; + proxyVendor = true; + + meta = with lib; { + description = "simple tool to give you Desktop Notifications about your battery"; + mainProgram = "upower-notify"; + homepage = "https://github.com/omeid/upower-notify"; + maintainers = with maintainers; [ kamilchm ]; + }; +} diff --git a/pkgs/by-name/up/ups/package.nix b/pkgs/by-name/up/ups/package.nix new file mode 100644 index 0000000000000..4da9d2f9f3ae0 --- /dev/null +++ b/pkgs/by-name/up/ups/package.nix @@ -0,0 +1,24 @@ +{ buildGoModule +, fetchFromGitHub +, lib +}: +buildGoModule rec { + pname = "ups"; + version = "0.2.1"; + + src = fetchFromGitHub { + owner = "rameshvarun"; + repo = "ups"; + rev = "v${version}"; + hash = "sha256-7AuZ1gyp8tAWHM0Ry54tKucPJ3enaGDtvrM1J8uBIT8="; + }; + + vendorHash = "sha256-c6aE6iD6yCnnuSEDhhr3v1ArcfLmSP8QhS7Cz7rtVHs="; + + meta = with lib; { + description = "Command line tool for creating and applying UPS patch files"; + homepage = "https://github.com/rameshvarun/ups"; + license = licenses.mit; + maintainers = with maintainers; [ ruby0b ]; + }; +} diff --git a/pkgs/by-name/up/upsun/package.nix b/pkgs/by-name/up/upsun/package.nix index 5e2d53d78667e..fd1242e593307 100644 --- a/pkgs/by-name/up/upsun/package.nix +++ b/pkgs/by-name/up/upsun/package.nix @@ -1,34 +1,62 @@ -{ stdenvNoCC, lib, fetchurl }: +{ + stdenvNoCC, + lib, + fetchurl, + testers, + installShellFiles, + upsun +}: -stdenvNoCC.mkDerivation rec { +let versions = lib.importJSON ./versions.json; + arch = if stdenvNoCC.hostPlatform.isx86_64 then "amd64" + else if stdenvNoCC.hostPlatform.isAarch64 then "arm64" + else throw "Unsupported architecture"; + os = if stdenvNoCC.hostPlatform.isLinux then "linux" + else if stdenvNoCC.hostPlatform.isDarwin then "darwin" + else throw "Unsupported os"; + versionInfo = versions."${os}-${arch}"; + inherit (versionInfo) hash url; + +in +stdenvNoCC.mkDerivation (finalAttrs: { pname = "upsun"; - version = "5.0.12"; + inherit (versions) version; - src = { - x86_64-linux = fetchurl { - url = "https://github.com/platformsh/cli/releases/download/${version}/upsun_${version}_linux_amd64.tar.gz"; - hash = "sha256-svEPMVY7r7pAoXwFIMYqCEduqR3Nkocaguf2nIGt+G8="; - }; - aarch64-linux = fetchurl { - url = "https://github.com/platformsh/cli/releases/download/${version}/upsun_${version}_linux_arm64.tar.gz"; - hash = "sha256-ZraS/PqSPL/kcj5o6hzDdL70IV2IWXOma6OHCiXIDQc="; - }; - }.${stdenvNoCC.system} or (throw "${pname}-${version}: ${stdenvNoCC.system} is unsupported."); + nativeBuildInputs = [ installShellFiles ]; + + # run ./update + src = fetchurl { inherit hash url; }; dontConfigure = true; dontBuild = true; sourceRoot = "."; installPhase = '' + runHook preInstall + install -Dm755 upsun $out/bin/upsun + + installShellCompletion completion/bash/upsun.bash \ + completion/zsh/_upsun + + runHook postInstall ''; + passthru = { + updateScript = ./update.sh; + tests.version = testers.testVersion { + inherit (finalAttrs) version; + package = upsun; + }; + }; + meta = { + description = "Unified tool for managing your Upsun services from the command line"; homepage = "https://github.com/platformsh/cli"; - description = "The unified tool for managing your Upsun services from the command line"; - maintainers = with lib.maintainers; [ spk ]; license = lib.licenses.mit; - platforms = [ "x86_64-linux" "aarch64-linux" ]; + mainProgram = "upsun"; + maintainers = with lib.maintainers; [ spk ]; + platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; }; -} +}) diff --git a/pkgs/by-name/up/upsun/update.sh b/pkgs/by-name/up/upsun/update.sh new file mode 100755 index 0000000000000..d01cef8a59e96 --- /dev/null +++ b/pkgs/by-name/up/upsun/update.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl jq +#shellcheck shell=bash + +set -eu -o pipefail + +version=$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \ + https://api.github.com/repos/platformsh/cli/releases/latest | jq -e -r ".tag_name") + +linux_arm64_url=https://github.com/platformsh/cli/releases/download/$version/upsun_${version}_linux_arm64.tar.gz +linux_amd64_url=https://github.com/platformsh/cli/releases/download/$version/upsun_${version}_linux_amd64.tar.gz +darwin_all_url=https://github.com/platformsh/cli/releases/download/$version/upsun_${version}_darwin_all.tar.gz +linux_arm64_hash=$(nix hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$linux_arm64_url")) +linux_amd64_hash=$(nix hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$linux_amd64_url")) +darwin_all_hash=$(nix hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$darwin_all_url")) +jq -n \ + --arg version "$version" \ + --arg darwin_all_hash "$darwin_all_hash" \ + --arg darwin_all_url "$darwin_all_url" \ + --arg linux_amd64_hash "$linux_amd64_hash" \ + --arg linux_amd64_url "$linux_amd64_url" \ + --arg linux_arm64_hash "$linux_arm64_hash" \ + --arg linux_arm64_url "$linux_arm64_url" \ + '{ "version": $version, + "darwin-amd64": { "hash": $darwin_all_hash, "url": $darwin_all_url }, + "darwin-arm64": { "hash": $darwin_all_hash, "url": $darwin_all_url }, + "linux-amd64": { "hash": $linux_amd64_hash, "url": $linux_amd64_url }, + "linux-arm64": { "hash": $linux_arm64_hash, "url": $linux_arm64_url } +}' > pkgs/by-name/up/upsun/versions.json diff --git a/pkgs/by-name/up/upsun/versions.json b/pkgs/by-name/up/upsun/versions.json new file mode 100644 index 0000000000000..dbf2a66f0d68c --- /dev/null +++ b/pkgs/by-name/up/upsun/versions.json @@ -0,0 +1,19 @@ +{ + "version": "5.0.21", + "darwin-amd64": { + "hash": "sha256-ePm8QOJcC87CqB1PbSAoMblopr7JsViHWW3BEQ+gjlQ=", + "url": "https://github.com/platformsh/cli/releases/download/5.0.21/upsun_5.0.21_darwin_all.tar.gz" + }, + "darwin-arm64": { + "hash": "sha256-ePm8QOJcC87CqB1PbSAoMblopr7JsViHWW3BEQ+gjlQ=", + "url": "https://github.com/platformsh/cli/releases/download/5.0.21/upsun_5.0.21_darwin_all.tar.gz" + }, + "linux-amd64": { + "hash": "sha256-1qbgXI3VtYoI/4EWPZ1jmWBVJEP+A60PIqXS38wnBPQ=", + "url": "https://github.com/platformsh/cli/releases/download/5.0.21/upsun_5.0.21_linux_amd64.tar.gz" + }, + "linux-arm64": { + "hash": "sha256-pUdRvVtEokuf7gznUogyufTtloy4MuT5TMcJ4z1bcwo=", + "url": "https://github.com/platformsh/cli/releases/download/5.0.21/upsun_5.0.21_linux_arm64.tar.gz" + } +} |