Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

granted: 0.34.1 -> 0.35.2 #347364

Merged
merged 7 commits into from
Oct 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 29 additions & 18 deletions pkgs/by-name/gr/granted/package.nix
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
{ bash
, buildGoModule
, fetchFromGitHub
{
bash,
buildGoModule,
fetchFromGitHub,
nix-update-script,
versionCheckHook,

, withFish ? false
, fish
withFish ? false,
fish,

, lib
, makeWrapper
, xdg-utils
lib,
makeWrapper,
xdg-utils,
}:

buildGoModule rec {
pname = "granted";
version = "0.34.1";
version = "0.35.2";

src = fetchFromGitHub {
owner = "common-fate";
repo = pname;
rev = "v${version}";
sha256 = "sha256-iNGagF4+Lz73Ctvh8Qs90E+xvuGi7LWHV/VbjjqMqRY=";
sha256 = "sha256-8Ou1TkPGAsrRfV75ntPKpXTUEhVkwgtaXErrRX8hR0E=";
};

vendorHash = "sha256-uKzs+plk1W2S7iPv2J1Mi1Ff88+82zrIXLy2eTzD/Hc=";
vendorHash = "sha256-XCq+hDxK7C9XYlKe+lUArQlPheWALx806o1IeCRD7vs=";

nativeBuildInputs = [ makeWrapper ];

Expand Down Expand Up @@ -73,18 +76,26 @@ buildGoModule rec {

# Insert below the #!/bin/sh shebang
echo "$addToPath" | sed "/#!\/bin\/sh/r /dev/stdin" $src/scripts/assume >> $out/bin/assume
'' + lib.optionalString withFish ''
# Install fish script
install -Dm755 $src/scripts/assume.fish $out/share/assume.fish
substituteInPlace $out/share/assume.fish \
--replace /bin/fish ${fish}/bin/fish
'';
''
+ lib.optionalString withFish ''
# Install fish script
install -Dm755 $src/scripts/assume.fish $out/share/assume.fish
substituteInPlace $out/share/assume.fish \
--replace /bin/fish ${fish}/bin/fish
'';

nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;

passthru.updateScript = nix-update-script { };

meta = with lib; {
description = "Easiest way to access your cloud";
homepage = "https://github.com/common-fate/granted";
changelog = "https://github.com/common-fate/granted/releases/tag/${version}";
license = licenses.mit;
maintainers = [ maintainers.ivankovnatsky ];
maintainers = with maintainers; [
jlbribeiro
];
};
}