nixpkgs-suyu/pkgs/applications/virtualization/umoci/default.nix

43 lines
884 B
Nix
Raw Normal View History

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