diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/tools/asmfmt')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/development/tools/asmfmt/default.nix | 33 | ||||
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/development/tools/asmfmt/deps.nix | 20 |
2 files changed, 53 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/asmfmt/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/asmfmt/default.nix new file mode 100644 index 000000000000..c93b864b70f8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/asmfmt/default.nix @@ -0,0 +1,33 @@ +{ buildGoPackage +, lib +, fetchFromGitHub +, fetchpatch +}: + +buildGoPackage rec { + pname = "asmfmt"; + version = "1.2.1"; + + goPackagePath = "github.com/klauspost/asmfmt"; + + src = fetchFromGitHub { + owner = "klauspost"; + repo = "asmfmt"; + rev = "v${version}"; + sha256 = "0qwxb4yx12yl817vgbhs7acaj98lgk27dh50mb8sm9ccw1f43h9i"; + }; + + goDeps = ./deps.nix; + + # This package comes with its own version of goimports, gofmt and goreturns + # but these binaries are outdated and are offered by other packages. + subPackages = [ "cmd/asmfmt" ]; + + meta = with lib; { + description = "Go Assembler Formatter"; + homepage = "https://github.com/klauspost/asmfmt"; + license = licenses.mit; + maintainers = with maintainers; [ kalbasit ]; + platforms = platforms.linux ++ platforms.darwin; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/asmfmt/deps.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/asmfmt/deps.nix new file mode 100644 index 000000000000..0288fc206d49 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/asmfmt/deps.nix @@ -0,0 +1,20 @@ +[ + { + goPackagePath = "golang.org/x/tools"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/tools"; + rev = "3a10b9bf0a52df7e992a8c3eb712a86d3c896c75"; + sha256 = "19f3dijcc54jnd7458jab2dgpd0gzccmv2qympd9wi8cc8jpnhws"; + }; + } + { + goPackagePath = "sourcegraph.com/sqs/goreturns"; + fetch = { + type = "git"; + url = "https://github.com/sqs/goreturns"; + rev = "538ac601451833c7c4449f8431d65d53c1c60e41"; + sha256 = "0gcplch8zmcgwl6xvcffxg50g3xnf60n7dlqxgn51179qcjr354p"; + }; + } +] |