diff options
author | Christian Segundo | 2024-02-25 00:34:29 +0100 |
---|---|---|
committer | Christian Segundo | 2024-02-25 00:34:29 +0100 |
commit | f1e40f560572a290aa6bcf4e7b9bbbaf5f233931 (patch) | |
tree | 08abb4d177015a7e563602d4c9c1b01365dfc0cf | |
parent | 89b7e73f45577898f6285216638e8da9d7f13a78 (diff) | |
download | pkgs-f1e40f560572a290aa6bcf4e7b9bbbaf5f233931.tar.gz |
Add kontext
-rw-r--r-- | flake.nix | 10 | ||||
-rw-r--r-- | pkgs/default.nix | 4 | ||||
-rw-r--r-- | pkgs/kontext.nix | 28 |
3 files changed, 42 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..7abd93d --- /dev/null +++ b/flake.nix @@ -0,0 +1,10 @@ +{ + outputs = { self, nixpkgs }@inputs: + let + forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed; + in + { + packages = forAllSystems (system: import ./pkgs (inputs // { inherit system; })); + overlays.default = final: prev: (import ./pkgs { pkgs = final; }); + }; +} diff --git a/pkgs/default.nix b/pkgs/default.nix new file mode 100644 index 0000000..bd8a98b --- /dev/null +++ b/pkgs/default.nix @@ -0,0 +1,4 @@ +{ pkgs, ... }: rec { + kontext = pkgs.callPackage ./kontext.nix { }; +} + diff --git a/pkgs/kontext.nix b/pkgs/kontext.nix new file mode 100644 index 0000000..48faeea --- /dev/null +++ b/pkgs/kontext.nix @@ -0,0 +1,28 @@ +{ stdenv, lib, fetchgit, makeWrapper, autoconf, automake, util-linux, kubectl }: +stdenv.mkDerivation rec { + name = "kontext"; + version = "1.0.0"; + + src = fetchgit { + url = "https://git.segundo.io/k8s/kontext"; + rev = "46d44777169aa8e18e7b5c3a69b9e679db8a4617"; + hash = "sha256-V63cboLzeX9kHtQKF5DPtBkkaBKbxTDNLPcfKB37YeQ="; + }; + + nativeBuildInputs = [ makeWrapper autoconf automake util-linux ]; + buildInputs = [ kubectl ]; + + configurePhase = '' + aclocal + autoconf + automake --add-missing + ./configure --prefix=$out + ''; + + meta = with lib; { + description = "Per shell Kubernetes contexts"; + license = licenses.gpl2Plus; + mainProgram = "kontext"; + platforms = platforms.unix; + }; +} |