From 2499446e9ececdfd25b1d4962c3b62f05940834f Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Fri, 14 Oct 2022 11:48:25 -0700 Subject: [PATCH] coldsnap: init at 0.4.2 --- pkgs/tools/admin/coldsnap/default.nix | 32 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/tools/admin/coldsnap/default.nix diff --git a/pkgs/tools/admin/coldsnap/default.nix b/pkgs/tools/admin/coldsnap/default.nix new file mode 100644 index 000000000000..cf29d3a790f5 --- /dev/null +++ b/pkgs/tools/admin/coldsnap/default.nix @@ -0,0 +1,32 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, openssl +, stdenv +, Security +, pkg-config +}: + +rustPlatform.buildRustPackage rec { + pname = "coldsnap"; + version = "0.4.2"; + + src = fetchFromGitHub { + owner = "awslabs"; + repo = pname; + rev = "v${version}"; + hash = "sha256-+JQjJ4F++S3eLnrqV1v4leepOvZBf8Vp575rnlDx2Cg="; + }; + cargoHash = "sha256-mAnoe9rK4+OpCzD7tzV+FQz+fFr8NapzsXtON3lS/tk"; + + buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + nativeBuildInputs = [ pkg-config ]; + + meta = with lib; { + homepage = "https://github.com/awslabs/coldsnap"; + description = "A command line interface for Amazon EBS snapshots"; + changelog = "https://github.com/awslabs/coldsnap/blob/${src.rev}/CHANGELOG.md"; + license = licenses.apsl20; + maintainers = with maintainers; [ hoverbear ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cac7c2df88f2..e724d67e5b46 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -394,6 +394,10 @@ with pkgs; conftest = callPackage ../development/tools/conftest { }; + coldsnap = callPackage ../tools/admin/coldsnap { + inherit (darwin.apple_sdk.frameworks) Security; + }; + colemak-dh = callPackage ../data/misc/colemak-dh { }; colmena = callPackage ../tools/admin/colmena { };