add flake
This commit is contained in:
parent
f094d4b9e6
commit
f16b43df69
2 changed files with 58 additions and 0 deletions
25
flake.lock
generated
Normal file
25
flake.lock
generated
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1618407731,
|
||||||
|
"narHash": "sha256-ks5XvRPDpt+CEiIAfqo0CxOzNQHdFiR7hRwGjVySzgk=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "55ac7d4580c9ab67848c98cb9519317a1cc399c8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
33
flake.nix
Normal file
33
flake.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
description = "Play YouTube videos from the command line in a convenient way";
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs }: {
|
||||||
|
|
||||||
|
defaultPackage.x86_64-linux =
|
||||||
|
with import nixpkgs { system = "x86_64-linux"; };
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
|
||||||
|
name = "tyt";
|
||||||
|
src = self;
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
jq
|
||||||
|
mpv
|
||||||
|
youtube-dl
|
||||||
|
];
|
||||||
|
|
||||||
|
patchPhase = ''
|
||||||
|
substituteInPlace tyt \
|
||||||
|
--replace jq ${jq}/bin/jq \
|
||||||
|
--replace mpv ${mpv}/bin/mpv \
|
||||||
|
--replace youtube-dl ${youtube-dl}/bin/youtube-dl
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
install -m 755 -D tyt $out/bin/tyt
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue