-
Notifications
You must be signed in to change notification settings - Fork 23
/
flake.nix
36 lines (32 loc) · 1.07 KB
/
flake.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
{
description = "A terminal iptv player written in bash";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages.termv =
pkgs.stdenv.mkDerivation {
name = "termv";
src = self;
phases = [ "unpackPhase" "patchPhase" "installPhase" ];
patchPhase = with pkgs; ''
substituteInPlace termv \
--replace curl ${curl}/bin/curl \
--replace fzf ${fzf}/bin/fzf \
--replace gawk ${gawk}/bin/gawk \
--replace jq ${jq}/bin/jq \
--replace mpv ${mpv}/bin/mpv \
--replace xdo ${xdo}/bin/xdo
'';
installPhase = ''
install -m 755 -D termv $out/bin/termv
'';
};
defaultPackage = self.packages.${system}.termv;
}
);
}