Merge pull request #176250 from aaronjheng/docker-slim
docker-slim: use buildGoModule
This commit is contained in:
commit
df4b44a441
1 changed files with 9 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue