mirror of
https://github.com/elwrcl/heliux.git
synced 2026-10-31 14:38:02 +03:00
61 lines
1.4 KiB
Nix
61 lines
1.4 KiB
Nix
{ ... }:
|
|
{
|
|
perSystem =
|
|
{ pkgs, system, ... }:
|
|
let
|
|
sources = import ./sources.nix;
|
|
|
|
version = if pkgs.stdenv.isDarwin then sources.versions.darwin else sources.versions.linux;
|
|
|
|
src = pkgs.fetchurl (
|
|
(sources.srcs.${system} or (throw "Unsupported system: ${system}")) sources.versions
|
|
);
|
|
|
|
helium = pkgs.callPackage ./package.nix { inherit version src; };
|
|
|
|
# same build with the proprietary Widevine CDM bundled, so DRM-protected
|
|
# streaming works out of the box. Kept as a separate output rather than a
|
|
# default so the plain `helium` package stays free-software only.
|
|
helium-widevine = helium.override { enableWidevine = true; };
|
|
|
|
app = {
|
|
type = "app";
|
|
program = "${helium}/bin/helium";
|
|
meta = {
|
|
inherit (helium.meta)
|
|
description
|
|
homepage
|
|
license
|
|
platforms
|
|
;
|
|
};
|
|
};
|
|
in
|
|
{
|
|
packages = {
|
|
default = helium;
|
|
inherit helium;
|
|
}
|
|
// pkgs.lib.optionalAttrs pkgs.stdenv.isLinux { inherit helium-widevine; };
|
|
|
|
apps = {
|
|
default = app;
|
|
helium = app;
|
|
};
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
packages = [
|
|
helium
|
|
pkgs.nix-update
|
|
];
|
|
};
|
|
|
|
formatter = pkgs.nixfmt-tree;
|
|
|
|
checks = {
|
|
build = helium;
|
|
};
|
|
};
|
|
|
|
}
|