-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2244197
commit 53575da
Showing
6 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.direnv/ | ||
stream-sprout.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ lib, | ||
mkShell, | ||
pkgs, | ||
stdenv, | ||
}: | ||
mkShell { | ||
packages = with pkgs; ([ | ||
ffmpeg-headless | ||
procps | ||
yq-go | ||
]); | ||
|
||
shellHook = '' | ||
''; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
description = "Stream Sprout flake"; | ||
inputs = { | ||
flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*.tar.gz"; | ||
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz"; | ||
}; | ||
|
||
outputs = { | ||
self, | ||
flake-schemas, | ||
nixpkgs, | ||
}: let | ||
# Define supported systems and a helper function for generating system-specific outputs | ||
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" ]; | ||
|
||
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { | ||
system = system; | ||
pkgs = import nixpkgs { inherit system; }; | ||
}); | ||
in { | ||
# Define schemas for the flake's outputs | ||
schemas = flake-schemas.schemas; | ||
|
||
# Define overlays for each supported system | ||
overlays = forEachSupportedSystem ({pkgs, system, ...}: { | ||
default = final: prev: { | ||
stream-sprout = final.callPackage ./package.nix { }; | ||
}; | ||
}); | ||
|
||
# Define packages for each supported system | ||
packages = forEachSupportedSystem ({pkgs, system, ...}: rec { | ||
stream-sprout = pkgs.callPackage ./package.nix { }; | ||
default = stream-sprout; | ||
}); | ||
|
||
# Define devShells for each supported system | ||
devShells = forEachSupportedSystem ({pkgs, system, ...}: { | ||
default = pkgs.callPackage ./devshell.nix { }; | ||
}); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ lib | ||
, installShellFiles | ||
, makeWrapper | ||
, stdenv | ||
, ffmpeg-headless | ||
, procps | ||
, yq-go | ||
}: | ||
let | ||
runtimePaths = [ | ||
ffmpeg-headless | ||
procps | ||
yq | ||
]; | ||
versionMatches = | ||
builtins.match '' | ||
.* | ||
readonly[[:blank:]]VERSION="([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)" | ||
.* | ||
'' (builtins.readFile ./stream-sprout); | ||
in | ||
stdenv.mkDerivation rec { | ||
pname = "stream-sprout"; | ||
version = builtins.concatStringsSep "" versionMatches; | ||
src = lib.cleanSource ./.; | ||
|
||
nativeBuildInputs = [ makeWrapper installShellFiles ]; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
install -Dm755 -t "$out/bin" stream-sprout | ||
runHook postInstall | ||
''; | ||
|
||
meta = { | ||
description = "Re-stream a video source to multiple destinations such as Twitch, YouTube, and Owncast."; | ||
homepage = "https://github.com/wimpys-world/stream-sprout"; | ||
mainProgram = "stream-sprout"; | ||
license = lib.licenses.asl20; | ||
maintainers = with lib.maintainers; [ flexiondotorg ]; | ||
}; | ||
} |