1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 makeWrapper,
6 gcc,
7 ncurses,
8}:
9
10stdenv.mkDerivation rec {
11 pname = "icmake";
12 version = "9.03.01";
13
14 src = fetchFromGitLab {
15 sha256 = "05r0a69w0hv2qhjpb2bxd0lmp2vv5r2d4iggg6ly4miam0i318jy";
16 rev = version;
17 repo = "icmake";
18 owner = "fbb-git";
19 };
20
21 setSourceRoot = ''
22 sourceRoot=$(echo */icmake)
23 '';
24
25 nativeBuildInputs = [ makeWrapper ];
26 buildInputs = [ gcc ];
27
28 preConfigure = ''
29 patchShebangs ./
30 substituteInPlace INSTALL.im --replace "usr/" ""
31 '';
32
33 buildPhase = ''
34 ./icm_prepare $out
35 ./icm_bootstrap x
36 '';
37
38 installPhase = ''
39 ./icm_install all /
40
41 wrapProgram $out/bin/icmbuild \
42 --prefix PATH : ${ncurses}/bin
43 '';
44
45 meta = with lib; {
46 description = "Program maintenance (make) utility using a C-like grammar";
47 homepage = "https://fbb-git.gitlab.io/icmake/";
48 license = licenses.gpl3;
49 maintainers = with maintainers; [ pSub ];
50 platforms = platforms.linux;
51 };
52}