Merge pull request #101185 from SuperSandro2000/lab-xdg-open

gitAndTools.lab: wrap xdg-open to fix `lab mr browse`
This commit is contained in:
Sandro 2020-11-26 22:07:19 +01:00 committed by GitHub
commit 48feb84a9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub }: { lib, buildGoModule, fetchFromGitHub, makeWrapper, xdg_utils }:
buildGoModule rec { buildGoModule rec {
pname = "lab"; pname = "lab";
@ -17,6 +17,8 @@ buildGoModule rec {
doCheck = false; doCheck = false;
buildInputs = [ makeWrapper ];
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
postInstall = '' postInstall = ''
@ -24,9 +26,10 @@ buildGoModule rec {
export LAB_CORE_HOST=a LAB_CORE_USER=b LAB_CORE_TOKEN=c export LAB_CORE_HOST=a LAB_CORE_USER=b LAB_CORE_TOKEN=c
$out/bin/lab completion bash > $out/share/bash-completion/completions/lab $out/bin/lab completion bash > $out/share/bash-completion/completions/lab
$out/bin/lab completion zsh > $out/share/zsh/site-functions/_lab $out/bin/lab completion zsh > $out/share/zsh/site-functions/_lab
wrapProgram $out/bin/lab --prefix PATH ":" "${lib.makeBinPath [ xdg_utils ]}";
''; '';
meta = with stdenv.lib; { meta = with lib; {
description = "Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab"; description = "Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab";
homepage = "https://zaquestion.github.io/lab"; homepage = "https://zaquestion.github.io/lab";
license = licenses.cc0; license = licenses.cc0;