2020-05-16 04:37:01 +01:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
|
|
|
, go-md2man
|
|
|
|
, installShellFiles
|
2021-04-06 23:15:04 +01:00
|
|
|
, bash
|
2020-05-16 04:37:01 +01:00
|
|
|
}:
|
2019-10-29 15:34:59 +00:00
|
|
|
|
2020-05-16 04:37:01 +01:00
|
|
|
buildGoModule rec {
|
2019-10-29 15:34:59 +00:00
|
|
|
pname = "umoci";
|
2021-04-06 23:15:04 +01:00
|
|
|
version = "0.4.7";
|
2019-10-29 15:34:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-06-28 04:49:13 +01:00
|
|
|
owner = "opencontainers";
|
2019-10-29 15:34:59 +00:00
|
|
|
repo = "umoci";
|
|
|
|
rev = "v${version}";
|
2021-04-06 23:15:04 +01:00
|
|
|
sha256 = "0in8kyi4jprvbm3zsl3risbjj8b0ma62yl3rq8rcvcgypx0mn7d4";
|
2019-10-29 15:34:59 +00:00
|
|
|
};
|
|
|
|
|
2020-05-16 04:37:01 +01:00
|
|
|
vendorSha256 = null;
|
2020-02-24 20:52:34 +00:00
|
|
|
|
2020-08-04 01:26:27 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-07-31 14:44:18 +01:00
|
|
|
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
2020-02-24 20:52:34 +00:00
|
|
|
|
2020-05-16 04:37:01 +01:00
|
|
|
nativeBuildInputs = [ go-md2man installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
2021-04-06 23:15:04 +01:00
|
|
|
substituteInPlace Makefile --replace \
|
|
|
|
'$(shell which bash)' '${lib.getBin bash}/bin/bash'
|
2020-06-28 04:49:13 +01:00
|
|
|
make docs
|
2020-05-16 04:37:01 +01:00
|
|
|
installManPage doc/man/*.[1-9]
|
|
|
|
'';
|
|
|
|
|
2020-02-24 20:52:34 +00:00
|
|
|
meta = with lib; {
|
2019-10-29 15:34:59 +00:00
|
|
|
description = "umoci modifies Open Container images";
|
2020-02-24 20:52:34 +00:00
|
|
|
homepage = "https://umo.ci";
|
2019-10-29 15:34:59 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ zokrezyl ];
|
2020-06-28 04:49:13 +01:00
|
|
|
platforms = platforms.unix;
|
2019-10-29 15:34:59 +00:00
|
|
|
};
|
|
|
|
}
|