forked from justchokingaround/lobster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
74 lines (64 loc) · 1.3 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
stdenvNoCC,
testers,
coreutils,
curl,
ffmpeg,
fzf,
gnugrep,
gnupatch,
gnused,
html-xml-utils,
lib,
makeWrapper,
mpv,
openssl,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "lobster";
version = "4.3.0";
src = builtins.path {
name = "${finalAttrs.pname}-${finalAttrs.version}";
filter = lib.cleanSourceFilter;
path = ./.;
};
nativeBuildInputs = [makeWrapper];
wrapperPaths = lib.makeBinPath [
coreutils
curl
ffmpeg
fzf
gnugrep
gnupatch
gnused
html-xml-utils
mpv
openssl
];
dontBuild = true;
preInstall = ''
patchShebangs --host lobster.sh
'';
installPhase = ''
runHook preInstall;
mkdir -p $out/bin
cp lobster.sh $out/bin/lobster
runHook postInstall
'';
postInstall = ''
wrapProgram $out/bin/lobster \
--prefix PATH : $wrapperPaths
'';
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
};
meta = {
description = "CLI to watch Movies/TV Shows from the terminal";
homepage = "https://github.com/justchokingaround/lobster";
license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [NotAShelf];
mainProgram = "lobster";
platforms = lib.platforms.unix;
sourceProvenance = [lib.sourceTypes.fromSource];
};
})