From 2980b1c4f4bbf0e15e709abd769613bcbe83839b Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Mon, 24 May 2021 14:05:07 +0300 Subject: [PATCH] imgcrypt: init at 1.1.1 --- .../virtualization/imgcrypt/default.nix | 32 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/applications/virtualization/imgcrypt/default.nix diff --git a/pkgs/applications/virtualization/imgcrypt/default.nix b/pkgs/applications/virtualization/imgcrypt/default.nix new file mode 100644 index 000000000000..c985632b9ebc --- /dev/null +++ b/pkgs/applications/virtualization/imgcrypt/default.nix @@ -0,0 +1,32 @@ +{ buildGoModule, fetchFromGitHub, lib }: + +buildGoModule rec { + pname = "imgcrypt"; + version = "1.1.1"; + + src = fetchFromGitHub { + owner = "containerd"; + repo = pname; + rev = "v${version}"; + sha256 = "177fs3p2xzwjsffcxqqllx6wi6ghfyqbvfgn95v3q7a2993yqk4k"; + }; + + buildFlagsArray = [ + "-ldflags=-X github.com/containerd/containerd/version.Version=${version}" + ]; + + vendorSha256 = null; + subPackages = [ "cmd/ctd-decoder" "cmd/ctr" ]; + + postFixup = '' + mv $out/bin/ctr $out/bin/ctr-enc + ''; + + meta = with lib; { + description = "Image encryption library and command line tool"; + homepage = "https://github.com/containerd/imgcrypt"; + license = licenses.asl20; + platforms = platforms.linux; + maintainers = with maintainers; [ mikroskeem ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f072e2b6ee51..78186f6dd1d1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1571,6 +1571,8 @@ in imgpatchtools = callPackage ../development/mobile/imgpatchtools { }; + imgcrypt = callPackage ../applications/virtualization/imgcrypt { }; + ipgrep = callPackage ../tools/networking/ipgrep { }; lastpass-cli = callPackage ../tools/security/lastpass-cli { };