Skip to content

Commit

Permalink
ktl: init at 1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
foolnotion committed Sep 17, 2024
1 parent 9c04f46 commit f4bf78b
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@

koivisto = pkgs.callPackage ./pkgs/koivisto { };

ktl = pkgs.callPackage ./pkgs/ktl { };

lexy = pkgs.callPackage ./pkgs/lexy { };

libdwarf = pkgs.callPackage ./pkgs/libdwarf { };
Expand Down
37 changes: 37 additions & 0 deletions pkgs/ktl/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{ lib, stdenv, fetchFromGitHub, cmake }:
let
cmake-utils = stdenv.mkDerivation rec {
name = "cmake-utils";
fetchurl = "https://raw.githubusercontent.com/karnkaul/cmake-utils/refs/heads/main/cmake-utils.cmake";
src = builtins.fetchurl {
url = fetchurl;
name = "cmake-utils.cmake";
sha256 = "sha256:1y5xjhqx05mwd5iagfcr2kyydib5lvrg7nhm59i3mpyljcyv4lky";
};
dontUnpack = true;
installPhase = "install -D $src $out/" + builtins.baseNameOf fetchurl;
};
in
stdenv.mkDerivation rec {
pname = "ktl";
version = "1.4.2";

src = fetchFromGitHub {
owner = "karnkaul";
repo = "ktl";
rev = "v.${version}";
hash = "sha256-5rLjW2oDuo/37jx7fDveGJGHP5HGBVL/MzMbCNf9VrM=";
};

nativeBuildInputs = [ cmake ];

cmakeFlags = [ "-DKTL_INSTALL=ON" "-DFETCHCONTENT_SOURCE_DIR_CMAKE-UTILS=${cmake-utils}" ];

meta = with lib; {
description = "A lightweight set of utility headers written in C++20.";
homepage = "https://github.com/karnkaul/ktl";
license = licenses.gpl3Only;
platforms = platforms.all;
#maintainers = with maintainers; [ foolnotion ];
};
}

0 comments on commit f4bf78b

Please sign in to comment.