glock: migrate to buildGoModule

This commit is contained in:
luftmensch-luftmensch 2024-06-09 18:44:07 +02:00 committed by Paul Meyer
parent ccf06777cb
commit 5b76bf87f0
4 changed files with 40 additions and 49 deletions

View File

@ -0,0 +1,40 @@
{ lib
, buildGoModule
, fetchFromGitHub
, fetchpatch
}:
buildGoModule {
pname = "glock";
version = "0-unstable-2021-03-19";
src = fetchFromGitHub {
owner = "robfig";
repo = "glock";
rev = "0ac7e52a4c8a9a7039a72b3c6a10e8be59bc6599";
hash = "sha256-EDaLk83u1gRcvEjrfBrLZBQZ5unyD9LQA2TccOawXII=";
};
patches = [
# Migrate to Go modules
(fetchpatch {
url = "https://github.com/robfig/glock/commit/943afe5e26dd64ebad5ca17613ae3700c53fb25d.patch";
hash = "sha256-nk+5uHlCv7Hxbo0Axvi15nJVzEcb++gOJpF3w06yQsk=";
})
];
vendorHash = "sha256-v3lfb+CXbTxzObDpubufD3Q1h6IhULcC/6spA6StfGw=";
checkFlags = [ "-skip=^TestSave$" ];
meta = {
homepage = "https://github.com/robfig/glock";
description = "Command-line tool to lock Go dependencies to specific revisions";
mainProgram = "glock";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
luftmensch-luftmensch
rushmorem
];
};
}

View File

@ -1,26 +0,0 @@
{ lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
pname = "glock";
version = "20160816-${lib.strings.substring 0 7 rev}";
rev = "b8c84ff5ade15a6238ca61c20d3afc70d2e41276";
goPackagePath = "github.com/robfig/glock";
src = fetchFromGitHub {
inherit rev;
owner = "robfig";
repo = "glock";
sha256 = "10jwn3k71p340g8d43zjx7k1j534rcd7rss8pif09mpfrn9qndhh";
};
goDeps = ./deps.nix;
meta = with lib; {
homepage = "https://github.com/robfig/glock";
description = "Command-line tool to lock Go dependencies to specific revisions";
mainProgram = "glock";
license = licenses.mit;
maintainers = [ maintainers.rushmorem ];
};
}

View File

@ -1,21 +0,0 @@
# This file was generated by go2nix.
[
{
goPackagePath = "github.com/agtorre/gocolorize";
fetch = {
type = "git";
url = "https://github.com/agtorre/gocolorize";
rev = "f42b554bf7f006936130c9bb4f971afd2d87f671";
sha256 = "1dj7s8bgw9qky344d0k9gz661c0m317a08a590184drw7m51hy9p";
};
}
{
goPackagePath = "golang.org/x/tools";
fetch = {
type = "git";
url = "https://go.googlesource.com/tools";
rev = "f1a397bba50dee815e8c73f3ec94ffc0e8df1a09";
sha256 = "1wy8nn2vg70n98g80i1zrk49129phyfbzxbicj748bmf82rnaxzg";
};
}
]

View File

@ -5385,8 +5385,6 @@ with pkgs;
globalarrays = callPackage ../development/libraries/globalarrays { };
glock = callPackage ../development/tools/glock { };
glslviewer = callPackage ../development/tools/glslviewer {
inherit (darwin.apple_sdk.frameworks) Cocoa;
};