1{ stdenv
2, lib
3, fetchurl
4, cmake
5, perl
6}:
7
8stdenv.mkDerivation rec {
9 pname = "rinutils";
10 version = "0.10.2";
11
12 src = fetchurl {
13 url = "https://github.com/shlomif/${pname}/releases/download/${version}/${pname}-${version}.tar.xz";
14 sha256 = "sha256-2H/hGZcit/qb1QjhNTg/8HiPvX1lXL75dXwjIS+MIXs=";
15 };
16
17 nativeBuildInputs = [ cmake perl ];
18
19 # https://github.com/shlomif/rinutils/issues/5
20 # (variable was unused at time of writing)
21 postPatch = ''
22 substituteInPlace librinutils.pc.in \
23 --replace '$'{exec_prefix}/@RINUTILS_INSTALL_MYLIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
24 '';
25
26 meta = with lib; {
27 description = "C11 / gnu11 utilities C library by Shlomi Fish / Rindolf";
28 homepage = "https://github.com/shlomif/rinutils";
29 changelog = "https://github.com/shlomif/rinutils/raw/${version}/NEWS.asciidoc";
30 license = licenses.mit;
31 maintainers = with maintainers; [ ];
32 platforms = platforms.all;
33 };
34}