about summary refs log tree commit diff
path: root/pkgs/development/tools/maligned
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2022-06-12 02:51:34 +0300
committerAzat Bahawi <azat@bahawi.net>2022-06-12 02:51:34 +0300
commit9a373323142ad35737ab74fa7b29d4fa6ccf0542 (patch)
tree3373c34c28aef01a5cbfc410f5bb8d349a99be12 /pkgs/development/tools/maligned
parent30d1a2f29e9b309533567dbe55d5ea72653cc6f9 (diff)
maligned: 2018-07-07 -> unstable-2022-02-04
Diffstat (limited to 'pkgs/development/tools/maligned')
-rw-r--r--pkgs/development/tools/maligned/default.nix27
-rw-r--r--pkgs/development/tools/maligned/deps.nix20
2 files changed, 14 insertions, 33 deletions
diff --git a/pkgs/development/tools/maligned/default.nix b/pkgs/development/tools/maligned/default.nix
index 06cd23e40f4b3..f39b83489f990 100644
--- a/pkgs/development/tools/maligned/default.nix
+++ b/pkgs/development/tools/maligned/default.nix
@@ -1,30 +1,31 @@
-{ buildGoPackage
-, lib
+{ lib
+, buildGoModule
 , fetchFromGitHub
+, go
 }:
 
-buildGoPackage rec {
-  pname = "maligned-unstable";
-  version = "2018-07-07";
-  rev = "6e39bd26a8c8b58c5a22129593044655a9e25959";
-
-  goPackagePath = "github.com/mdempsky/maligned";
+buildGoModule rec {
+  pname = "maligned";
+  version = "unstable-2022-02-04";
+  rev = "d7cd9a96ae47d02b08234503b54709ad4ae82105";
 
   src = fetchFromGitHub {
-    inherit rev;
-
     owner = "mdempsky";
     repo = "maligned";
-    sha256 = "08inr5xjqv9flrlyhqd8ck1q26y5xb6iilz0xkb6bqa4dl5ialhi";
+    inherit rev;
+    sha256 = "sha256-exljmDNtVhjJkvh0EomcbBXSsmQx4I59MHDfMWSQyKk=";
   };
 
-  goDeps = ./deps.nix;
+  vendorSha256 = "sha256-q/0lxZWk3a7brMsbLvZUSZ8XUHfWfx79qxjir1Vygx4=";
+
+  allowGoReference = true;
+
+  checkInputs = [ go ];
 
   meta = with lib; {
     description = "Tool to detect Go structs that would take less memory if their fields were sorted";
     homepage = "https://github.com/mdempsky/maligned";
     license = licenses.bsd3;
     maintainers = with maintainers; [ kalbasit ];
-    platforms = platforms.linux ++ platforms.darwin;
   };
 }
diff --git a/pkgs/development/tools/maligned/deps.nix b/pkgs/development/tools/maligned/deps.nix
deleted file mode 100644
index afe5e50e47bdd..0000000000000
--- a/pkgs/development/tools/maligned/deps.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-[
-  {
-    goPackagePath = "github.com/kisielk/gotool";
-    fetch = {
-      type = "git";
-      url = "https://github.com/kisielk/gotool";
-      rev = "80517062f582ea3340cd4baf70e86d539ae7d84d";
-      sha256 = "14af2pa0ssyp8bp2mvdw184s5wcysk6akil3wzxmr05wwy951iwn";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/tools";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/tools";
-      rev = "96e9e165b75e735822645eff82850b08c377be36";
-      sha256 = "1zj9ck5sg9b0pphxybmvxf64hhcap7v7j37fx3v5aknf18crjjdg";
-    };
-  }
-]