summaryrefslogtreecommitdiff
path: root/odin/strm.nix
blob: 8c88514e282adb31641bc93b6cf9766279c809bd (plain)
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
{ stdenv, zsh, ffmpeg-full, youtube-dl, pv, notmuch }:

stdenv.mkDerivation {
  name = "strm";
  src = ./strm;

  phases = [ "unpackPhase" "buildPhase" "installPhase" ];

  inherit zsh pv notmuch;
  ffmpeg = ffmpeg-full;
  youtubedl = youtube-dl;

  buildPhase = ''
    substituteAllInPlace download_youtube
    substituteAllInPlace cleanup_youtube
    substituteAllInPlace send_media
    substituteAllInPlace cache_media
    substituteAllInPlace send_kitty
  '';

  installPhase = ''
    mkdir -p $out/bin

    install -m 755 -t $out/bin \
      download_youtube \
      cleanup_youtube \
      send_media \
      cache_media \
      send_kitty
  '';
}