nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6}:
7
8stdenv.mkDerivation (finalAttrs: {
9 pname = "rang";
10 version = "3.2";
11
12 src = fetchFromGitHub {
13 owner = "agauniyal";
14 repo = "rang";
15 tag = "v${finalAttrs.version}";
16 hash = "sha256-NK7jB5ijcu9OObmfLgiWxlJi4cVAhr7p6m9HKf+5TnQ=";
17 };
18
19 postPatch = ''
20 substituteInPlace CMakeLists.txt \
21 --replace-fail "cmake_minimum_required(VERSION 3.1)" "cmake_minimum_required(VERSION 3.10)"
22 '';
23
24 nativeBuildInputs = [ cmake ];
25
26 meta = {
27 description = "Minimal, Header only Modern c++ library for terminal goodies";
28 homepage = "https://agauniyal.github.io/rang/";
29 license = lib.licenses.unlicense;
30 maintainers = [ lib.maintainers.HaoZeke ];
31 };
32})