From fd2922cc97599172851f0817abc84ead2ba54cdb Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 16 Mar 2023 11:44:21 +0100 Subject: [PATCH] Switch to overlay --- README.md | 5 +++++ default.nix | 4 ++++ kaniko.nix | 24 ++++++++++++++++++++++++ manifest-tool.nix | 24 ++++++++++++++++++++++++ 4 files changed, 57 insertions(+) create mode 100644 default.nix create mode 100644 kaniko.nix create mode 100644 manifest-tool.nix diff --git a/README.md b/README.md index b90a7da..51e7764 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ # nixuniverse +## Quick start + +``` +nix-shell -E "with import { overlays = [ (import ./default.nix) ];}; mkShell { buildInputs = [ kaniko manifest-tool ]; }" +``` diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..10ccc16 --- /dev/null +++ b/default.nix @@ -0,0 +1,4 @@ +self: super: { + kaniko = (import ./kaniko.nix) super; + manifest-tool = (import ./manifest-tool.nix) super; +} diff --git a/kaniko.nix b/kaniko.nix new file mode 100644 index 0000000..77f60c0 --- /dev/null +++ b/kaniko.nix @@ -0,0 +1,24 @@ +pkgs: +pkgs.buildGoModule rec { + pname = "kaniko"; + version = "1.9.1"; + + src = pkgs.fetchFromGitHub { + owner = "GoogleContainerTools"; + repo = "kaniko"; + rev = "v${version}"; + sha256 = "sha256-TXgzO/NfLXVo5a7yyO3XYSk+9H1CwMF+vwbRx3kchQ8="; + }; + + vendorSha256 = null; + + checkPhase = "true"; + + meta = with pkgs.lib; { + description = + "kaniko is a tool to build container images from a Dockerfile, inside a container or Kubernetes cluster."; + homepage = "https://github.com/GoogleContainerTools/kaniko"; + license = licenses.asl20; + platforms = platforms.linux; + }; +} diff --git a/manifest-tool.nix b/manifest-tool.nix new file mode 100644 index 0000000..1090a6e --- /dev/null +++ b/manifest-tool.nix @@ -0,0 +1,24 @@ +pkgs: +pkgs.buildGoModule rec { + pname = "manifest-tool"; + version = "2.0.5"; + + src = pkgs.fetchFromGitHub { + owner = "estesp"; + repo = "manifest-tool"; + rev = "v${version}"; + sha256 = "hjCGKnE0yrlnF/VIzOwcDzmQX3Wft+21KCny/opqdLg="; + } + "/v2"; + + vendorSha256 = null; + + checkPhase = "true"; + + meta = with pkgs.lib; { + description = + "Command line tool to create and query container image manifest list/indexes"; + homepage = "https://github.com/estesp/manifest-tool"; + license = licenses.asl20; + platforms = platforms.linux; + }; +}