initial commit
This commit is contained in:
commit
8c91d525aa
5 changed files with 299 additions and 0 deletions
49
flake.nix
Normal file
49
flake.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
description = "Stream media over SSH.";
|
||||
|
||||
nixConfig.bash-prompt = "\[strm-develop\]$ ";
|
||||
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
|
||||
flake-utils.lib.eachDefaultSystem
|
||||
(system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
# Use mpv with scripts
|
||||
mpv = (pkgs.mpv-with-scripts.override {
|
||||
scripts = [
|
||||
pkgs.mpvScripts.mpris
|
||||
];
|
||||
});
|
||||
in
|
||||
{
|
||||
|
||||
# Package
|
||||
packages.strm =
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "strm";
|
||||
src = self;
|
||||
patchPhase = with pkgs; ''
|
||||
substituteInPlace strm \
|
||||
--replace mpv ${mpv}/bin/mpv \
|
||||
'';
|
||||
installPhase = ''
|
||||
install -m 755 -D strm $out/bin/strm
|
||||
'';
|
||||
};
|
||||
defaultPackage = self.packages.${system}.strm;
|
||||
|
||||
# Development shell
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
mpv
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue