paco: use buildGoModule

This commit is contained in:
Aaron Jheng 2023-01-25 11:51:59 +00:00
parent 4d52a644a7
commit d0287b2abe
No known key found for this signature in database
GPG key ID: F6A547A869D050A3
2 changed files with 16 additions and 98 deletions

View file

@ -1,6 +1,6 @@
{ lib, buildGoPackage, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub, fetchpatch }:
buildGoPackage rec {
buildGoModule rec {
pname = "paco";
version = "1.0";
@ -8,11 +8,22 @@ buildGoPackage rec {
owner = "pacolang";
repo = "paco";
rev = "v${version}";
sha256 = "03x75h40dhjswbf2g1408krj9b1w05y9pjzygzhklldc75r3n9dh";
hash = "sha256-sCU7cjmsUTrhf/7Lm3wBPKwk80SAhCfc4lrCBggspw8=";
};
goPackagePath = "github.com/pacolang/paco";
goDeps = ./deps.nix;
vendorHash = "sha256-J0TKp1df5IWq3Irlzf1lvhWlXnP//MsVqs9M8TtEraw=";
patches = [
# Set correct package path in go.mod
(fetchpatch {
url = "https://github.com/pacolang/paco/pull/1/commits/886f0407e94418d34c7e062c6857834aea3c99ac.patch";
hash = "sha256-HRNJSyWz1OY+kCV+eaRJbaDXkH4n1NaMpFxCuEhocK4=";
})
];
subPackages = [ "." ];
ldflags = [ "-s" "-w" ];
meta = with lib; {
description = "A simple compiled programming language";

View file

@ -1,93 +0,0 @@
# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix)
[
{
goPackagePath = "github.com/davecgh/go-spew";
fetch = {
type = "git";
url = "https://github.com/davecgh/go-spew";
rev = "v1.1.0";
sha256 = "0d4jfmak5p6lb7n2r6yvf5p1zcw0l8j74kn55ghvr7zr7b7axm6c";
};
}
{
goPackagePath = "github.com/gookit/color";
fetch = {
type = "git";
url = "https://github.com/gookit/color";
rev = "v1.1.7";
sha256 = "02gq82i9srr8bv5yhgkmn5j1r3pn8wspiisvhpbyhykm1fn736mz";
};
}
{
goPackagePath = "github.com/kr/pty";
fetch = {
type = "git";
url = "https://github.com/kr/pty";
rev = "v1.1.1";
sha256 = "0383f0mb9kqjvncqrfpidsf8y6ns5zlrc91c6a74xpyxjwvzl2y6";
};
}
{
goPackagePath = "github.com/kr/text";
fetch = {
type = "git";
url = "https://github.com/kr/text";
rev = "v0.1.0";
sha256 = "1gm5bsl01apvc84bw06hasawyqm4q84vx1pm32wr9jnd7a8vjgj1";
};
}
{
goPackagePath = "github.com/niemeyer/pretty";
fetch = {
type = "git";
url = "https://github.com/niemeyer/pretty";
rev = "a10e7caefd8e";
sha256 = "1jmazh4xzaa3v6g46hz60q2z7nmqs9l9cxdzmmscn3kbcs2znq4v";
};
}
{
goPackagePath = "github.com/pmezard/go-difflib";
fetch = {
type = "git";
url = "https://github.com/pmezard/go-difflib";
rev = "v1.0.0";
sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
};
}
{
goPackagePath = "github.com/stretchr/objx";
fetch = {
type = "git";
url = "https://github.com/stretchr/objx";
rev = "v0.1.0";
sha256 = "19ynspzjdynbi85xw06mh8ad5j0qa1vryvxjgvbnyrr8rbm4vd8w";
};
}
{
goPackagePath = "github.com/stretchr/testify";
fetch = {
type = "git";
url = "https://github.com/stretchr/testify";
rev = "v1.3.0";
sha256 = "0wjchp2c8xbgcbbq32w3kvblk6q6yn533g78nxl6iskq6y95lxsy";
};
}
{
goPackagePath = "gopkg.in/check.v1";
fetch = {
type = "git";
url = "https://gopkg.in/check.v1";
rev = "8fa46927fb4f";
sha256 = "0fx03x0nx9mjwnqphnx852q9p76qg7cazrachvgr1bj357lplrcw";
};
}
{
goPackagePath = "gopkg.in/pipe.v2";
fetch = {
type = "git";
url = "https://gopkg.in/pipe.v2";
rev = "3c2ca4d52544";
sha256 = "090wrj4n6a6pzdlakcxy9qnkngc8hp6m49ipbnlszs0hyj2hnngv";
};
}
]