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