1{ stdenv, lib, fetchFromGitHub, gprolog }:
2
3stdenv.mkDerivation rec {
4 pname = "profetch";
5 version = "0.1.7";
6
7 src = fetchFromGitHub {
8 owner = "RustemB";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "sha256-JsjpPUXMN0jytRS4yzSjrseqHiEQ+YinklG+tIIy+Zo=";
12 };
13
14 nativeBuildInputs = [ gprolog ];
15
16 buildPhase = ''
17 runHook preBuild
18 gplc profetch.pl --no-top-level --no-debugger \
19 --no-fd-lib --no-fd-lib-warn \
20 --min-size -o profetch
21 runHook postBuild
22 '';
23
24 installPhase = ''
25 runHook preInstall
26 install -Dm755 -t $out/bin profetch
27 runHook postInstall
28 '';
29
30 meta = with lib; {
31 description = "System Information Fetcher Written in GNU/Prolog";
32 homepage = "https://github.com/RustemB/profetch";
33 license = licenses.gpl3Only;
34 platforms = platforms.all;
35 maintainers = [ maintainers.vel ];
36 };
37}