mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-20 11:53:51 +00:00
Merge pull request #225363 from SuperSandro2000/stern
This commit is contained in:
commit
f59f894b9a
@ -1,7 +1,5 @@
|
||||
{ stdenv, lib, buildPackages, buildGoModule, fetchFromGitHub, installShellFiles }:
|
||||
let isCrossBuild = stdenv.hostPlatform != stdenv.buildPlatform;
|
||||
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "stern";
|
||||
version = "1.24.0";
|
||||
@ -19,12 +17,11 @@ buildGoModule rec {
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
ldflags =
|
||||
[ "-s" "-w" "-X github.com/stern/stern/cmd.version=${version}" ];
|
||||
ldflags = [ "-s" "-w" "-X github.com/stern/stern/cmd.version=${version}" ];
|
||||
|
||||
postInstall =
|
||||
let stern = if isCrossBuild then buildPackages.stern else "$out";
|
||||
in
|
||||
postInstall = let
|
||||
stern = if stdenv.buildPlatform.canExecute stdenv.hostPlatform then "$out" else buildPackages.stern;
|
||||
in
|
||||
''
|
||||
for shell in bash zsh; do
|
||||
${stern}/bin/stern --completion $shell > stern.$shell
|
||||
|
Loading…
Reference in New Issue
Block a user