diff options
author | Aaron Jheng <wentworth@outlook.com> | 2022-06-04 14:19:08 +0000 |
---|---|---|
committer | Aaron Jheng <wentworth@outlook.com> | 2022-06-04 14:19:08 +0000 |
commit | 9d80c2f6821d2bacbe127b7a9cbe18a26426cf3d (patch) | |
tree | 2cfb95fdb24eb8cc18bc220c6341c4ba8e240f7b /pkgs/applications/virtualization/docker-slim/default.nix | |
parent | f3efa1d285f35d51cb31c4bf37d12e4a7b1ef965 (diff) |
docker-slim: use buildGoModule
Diffstat (limited to 'pkgs/applications/virtualization/docker-slim/default.nix')
-rw-r--r-- | pkgs/applications/virtualization/docker-slim/default.nix | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/pkgs/applications/virtualization/docker-slim/default.nix b/pkgs/applications/virtualization/docker-slim/default.nix index dbf4bb734d84..09c8de64f280 100644 --- a/pkgs/applications/virtualization/docker-slim/default.nix +++ b/pkgs/applications/virtualization/docker-slim/default.nix @@ -1,15 +1,9 @@ -{ lib -, buildGoPackage -, fetchFromGitHub -, makeWrapper -}: +{ lib, buildGoModule, fetchFromGitHub, makeWrapper }: -buildGoPackage rec { +buildGoModule rec { pname = "docker-slim"; version = "1.37.6"; - goPackagePath = "github.com/docker-slim/docker-slim"; - src = fetchFromGitHub { owner = "docker-slim"; repo = "docker-slim"; @@ -17,16 +11,17 @@ buildGoPackage rec { sha256 = "sha256-Jzi6JC6DRklZhNqmFx6eHx6qR8/fb/JuSpgwtPThcc4="; }; + vendorSha256 = null; + subPackages = [ "cmd/docker-slim" "cmd/docker-slim-sensor" ]; - nativeBuildInputs = [ - makeWrapper - ]; + nativeBuildInputs = [ makeWrapper ]; ldflags = [ - "-s" "-w" - "-X ${goPackagePath}/pkg/version.appVersionTag=${version}" - "-X ${goPackagePath}/pkg/version.appVersionRev=${src.rev}" + "-s" + "-w" + "-X github.com/docker-slim/docker-slim/pkg/version.appVersionTag=${version}" + "-X github.com/docker-slim/docker-slim/pkg/version.appVersionRev=${src.rev}" ]; # docker-slim tries to create its state dir next to the binary (inside the nix |