lol
1{
2 stdenv,
3 mlton,
4 lib,
5 fetchFromGitHub,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "initool";
10 version = "1.0.0";
11
12 src = fetchFromGitHub {
13 owner = "dbohdan";
14 repo = "initool";
15 rev = "v${version}";
16 hash = "sha256-PROsyYw8xdnn0PX+3OyUPaybQbTmO88G2koeZhBfwjg=";
17 };
18
19 nativeBuildInputs = [ mlton ];
20
21 doCheck = true;
22
23 installPhase = ''
24 runHook preInstall
25
26 mkdir -p $out/bin
27 cp initool $out/bin/
28
29 runHook postInstall
30 '';
31
32 meta = {
33 inherit (mlton.meta) platforms;
34
35 description = "Manipulate INI files from the command line";
36 mainProgram = "initool";
37 homepage = "https://github.com/dbohdan/initool";
38 license = lib.licenses.mit;
39 maintainers = with lib.maintainers; [ e1mo ];
40 changelog = "https://github.com/dbohdan/initool/releases/tag/v${version}";
41 };
42}