1{
2 stdenvNoCC,
3 fetchFromGitLab,
4 lib,
5 full ? true,
6 # see https://gitlab.com/jschx/ufetch for a list
7 osName ? "nixos",
8}:
9
10stdenvNoCC.mkDerivation (finalAttrs: {
11 pname = "ufetch";
12 version = "0.4";
13
14 src = fetchFromGitLab {
15 owner = "jschx";
16 repo = "ufetch";
17 rev = "v${finalAttrs.version}";
18 hash = "sha256-icrf7OjDageBRSBD40wX2ZzCvB6T5n0jgd5aRROGqCA=";
19 };
20
21 installPhase = ''
22 runHook preInstall
23 mkdir -p $out/bin $out/share/licenses/ufetch
24 ${
25 if !full then
26 "install -Dm755 ufetch-${osName} $out/bin/ufetch"
27 else
28 ''
29 install -Dm755 ufetch-* $out/bin
30 ln -s $out/bin/ufetch-${osName} $out/bin/ufetch
31 ''
32 }
33 install -Dm644 LICENSE $out/share/licenses/ufetch/LICENSE
34 runHook postInstall
35 '';
36
37 meta = {
38 description = "Tiny system info for Unix-like operating systems";
39 homepage = "https://gitlab.com/jschx/ufetch";
40 license = lib.licenses.mit;
41 platforms = lib.platforms.linux;
42 mainProgram = "ufetch";
43 maintainers = with lib.maintainers; [ mrtnvgr ];
44 };
45})