Merge pull request #182106 from SuperSandro2000/dive

Revert go 1.17 bumps because of outdated golang.org/x/sys
This commit is contained in:
Sandro 2022-07-22 14:28:07 +02:00 committed by GitHub
commit bbda031dd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 14 deletions

View File

@ -1,4 +1,13 @@
{ lib, stdenv, buildGoModule, fetchFromGitHub, pkg-config, btrfs-progs, gpgme, lvm2 }:
{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
, fetchpatch
, pkg-config
, btrfs-progs
, gpgme
, lvm2
}:
buildGoModule rec {
pname = "dive";
@ -11,7 +20,14 @@ buildGoModule rec {
sha256 = "sha256-1pmw8pUlek5FlI1oAuvLSqDow7hw5rw86DRDZ7pFAmA=";
};
vendorSha256 = "sha256-0gJ3dAPoilh3IWkuesy8geNsuI1T0DN64XvInc9LvlM=";
patches = [
(fetchpatch {
url = "https://github.com/wagoodman/dive/commit/fe9411c414418d839a8638bb9a12ccfc892b5845.patch";
sha256 = "sha256-c0TcUQ87CeOiXHoTQ3z/04i72aDr403DL7fIbXTJ9cY=";
})
];
vendorSha256 = "sha256-YPkEei7d7mXP+5FhooNoMDARQLosH2fdSaLXGZ5C27o=";
nativeBuildInputs = [ pkg-config ];

View File

@ -1,7 +1,13 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub
, Cocoa ? null }:
{ stdenv
, lib
, buildGoModule
, fetchFromGitHub
, fetchurl
, Cocoa
, installShellFiles
}:
buildGoPackage rec {
buildGoModule rec {
pname = "noti";
version = "3.5.0";
@ -12,17 +18,29 @@ buildGoPackage rec {
sha256 = "12r9wawwl6x0rfv1kahwkamfa0pjq24z60az9pn9nsi2z1rrlwkd";
};
patches = [
# update golang.org/x/sys to fix building on aarch64-darwin
# using fetchurl because fetchpatch breaks the patch
(fetchurl {
url = "https://github.com/variadico/noti/commit/a90bccfdb2e6a0adc2e92f9a4e7be64133832ba9.patch";
sha256 = "sha256-vSAwuAR9absMSFqGOlzmRZoOGC/jpkmh8CMCVjeleUo=";
})
];
vendorSha256 = null;
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optional stdenv.isDarwin Cocoa;
goPackagePath = "github.com/variadico/noti";
ldflags = [
"-X ${goPackagePath}/internal/command.Version=${version}"
"-s"
"-w"
"-X github.com/variadico/noti/internal/command.Version=${version}"
];
postInstall = ''
install -Dm444 -t $out/share/man/man1 $src/docs/man/*.1
install -Dm444 -t $out/share/man/man5 $src/docs/man/*.5
installManPage docs/man/*
'';
meta = with lib; {

View File

@ -4252,7 +4252,6 @@ with pkgs;
noti = callPackage ../tools/misc/noti {
inherit (darwin.apple_sdk.frameworks) Cocoa;
buildGoPackage = buildGo117Package;
};
notify = callPackage ../tools/misc/notify { };
@ -15749,9 +15748,7 @@ with pkgs;
binutils = binutils;
};
dive = callPackage ../development/tools/dive {
buildGoModule = buildGo117Module;
};
dive = callPackage ../development/tools/dive { };
doclifter = callPackage ../development/tools/misc/doclifter { };