mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
docker-slim: 1.26.1 -> 1.27.0
Changelog: https://github.com/docker-slim/docker-slim/releases/tag/1.27.0
This commit is contained in:
parent
7948e6785b
commit
e24855d70d
1 changed files with 10 additions and 27 deletions
|
@ -4,26 +4,17 @@
|
|||
, makeWrapper
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
version = "1.26.1";
|
||||
rev = "2ec04e169b12a87c5286aa09ef44eac1cea2c7a1";
|
||||
|
||||
in buildGoPackage rec {
|
||||
buildGoPackage rec {
|
||||
pname = "docker-slim";
|
||||
inherit version;
|
||||
version = "1.27.0";
|
||||
|
||||
goPackagePath = "github.com/docker-slim/docker-slim";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "docker-slim";
|
||||
repo = "docker-slim";
|
||||
inherit rev;
|
||||
# fetchzip yields a different hash on Darwin because `use-case-hack`
|
||||
sha256 =
|
||||
if stdenv.isDarwin
|
||||
then "0j72rn6qap78qparrnslxm3yv83mzy1yc7ha0crb4frwkzmspyvf"
|
||||
else "01bjb14z7yblm7qdqrx1j2pw5x5da7a6np4rkzay931gly739gbh";
|
||||
rev = version;
|
||||
sha256 = "1pd9sz981qgr5lx6ikrhdp0n21nyrnpjpnyl8i4r2jx35zr8b5q8";
|
||||
};
|
||||
|
||||
subPackages = [ "cmd/docker-slim" "cmd/docker-slim-sensor" ];
|
||||
|
@ -32,20 +23,12 @@ in buildGoPackage rec {
|
|||
makeWrapper
|
||||
];
|
||||
|
||||
# docker-slim vendorized logrus files in different directories, which
|
||||
# conflicts on case-sensitive filesystems
|
||||
preBuild = stdenv.lib.optionalString stdenv.isLinux ''
|
||||
mv go/src/${goPackagePath}/vendor/github.com/Sirupsen/logrus/* \
|
||||
go/src/${goPackagePath}/vendor/github.com/sirupsen/logrus/
|
||||
'';
|
||||
|
||||
buildFlagsArray =
|
||||
let
|
||||
ldflags = "-ldflags=-s -w " +
|
||||
"-X ${goPackagePath}/pkg/version.appVersionTag=${version} " +
|
||||
"-X ${goPackagePath}/pkg/version.appVersionRev=${rev}";
|
||||
in
|
||||
[ ldflags ];
|
||||
buildFlagsArray = [
|
||||
''-ldflags=
|
||||
-s -w -X ${goPackagePath}/pkg/version.appVersionTag=${version}
|
||||
-X ${goPackagePath}/pkg/version.appVersionRev=${src.rev}
|
||||
''
|
||||
];
|
||||
|
||||
# docker-slim tries to create its state dir next to the binary (inside the nix
|
||||
# store), so we set it to use the working directory at the time of invocation
|
||||
|
|
Loading…
Reference in a new issue