tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
ctpv: 1.0 -> 1.1
zendo
2 years ago
e700b7ab
e3eeeeca
+38
-15
1 changed file
expand all
collapse all
unified
split
pkgs
applications
file-managers
lf
ctpv.nix
+38
-15
pkgs/applications/file-managers/lf/ctpv.nix
···
1
{ lib
2
-
, pkgs
0
0
3
, file
4
, openssl
5
-
, stdenv
6
-
, fetchFromGitHub
7
-
, waylandSupport ? stdenv.isLinux
8
-
, x11Support ? stdenv.isLinux
0
0
0
0
0
0
0
9
}:
10
11
stdenv.mkDerivation rec {
12
pname = "ctpv";
13
-
version = "1.0";
14
15
src = fetchFromGitHub {
16
owner = "NikitaIvanovV";
17
-
repo = "${pname}";
18
rev = "v${version}";
19
-
hash = "sha256-0OuskRCBVm8vMd2zH5u5EPABmCOlEv5N4ZZMdc7bAwM=";
20
};
21
22
-
nativeBuildInputs = [
0
0
23
file # libmagic
24
openssl
25
];
26
-
27
-
buildInputs = with pkgs; [
28
-
ffmpegthumbnailer ffmpeg
29
-
] ++ lib.optionals waylandSupport [ chafa ]
30
-
++ lib.optionals x11Support [ ueberzug ];
31
32
makeFlags = [ "PREFIX=$(out)" ];
33
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
34
meta = with lib; {
35
-
description = "Image previews for lf (list files) file manager";
36
homepage = "https://github.com/NikitaIvanovV/ctpv";
37
license = licenses.mit;
38
platforms = platforms.linux;
···
1
{ lib
2
+
, stdenv
3
+
, fetchFromGitHub
4
+
, makeWrapper
5
, file
6
, openssl
7
+
, atool
8
+
, bat
9
+
, chafa
10
+
, delta
11
+
, ffmpeg
12
+
, ffmpegthumbnailer
13
+
, fontforge
14
+
, glow
15
+
, imagemagick
16
+
, jq
17
+
, ueberzug
18
}:
19
20
stdenv.mkDerivation rec {
21
pname = "ctpv";
22
+
version = "1.1";
23
24
src = fetchFromGitHub {
25
owner = "NikitaIvanovV";
26
+
repo = pname;
27
rev = "v${version}";
28
+
hash = "sha256-3BQi4m44hBmPkJBFNCg6d9YKRbDZwLxdzBb/NDWTQP4=";
29
};
30
31
+
nativeBuildInputs = [ makeWrapper ];
32
+
33
+
buildInputs = [
34
file # libmagic
35
openssl
36
];
0
0
0
0
0
37
38
makeFlags = [ "PREFIX=$(out)" ];
39
40
+
preFixup = ''
41
+
wrapProgram $out/bin/ctpv \
42
+
--prefix PATH ":" "${lib.makeBinPath [
43
+
atool # for archive files
44
+
bat
45
+
chafa # for image files on Wayland
46
+
delta # for diff files
47
+
ffmpeg
48
+
ffmpegthumbnailer
49
+
fontforge
50
+
glow # for markdown files
51
+
imagemagick
52
+
jq # for json files
53
+
ueberzug # for image files on X11
54
+
]}";
55
+
'';
56
+
57
meta = with lib; {
58
+
description = "File previewer for a terminal";
59
homepage = "https://github.com/NikitaIvanovV/ctpv";
60
license = licenses.mit;
61
platforms = platforms.linux;