livestream/flake.nix

49 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2023-06-13 00:07:14 +03:00
{
inputs = {
2023-07-26 03:23:33 +03:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
2023-06-13 00:07:14 +03:00
nix2container.url = "github:nlewo/nix2container";
};
2025-02-01 19:03:29 +02:00
outputs =
{ nixpkgs
, flake-utils
, nix2container
, ...
}:
2023-07-26 03:23:33 +03:00
flake-utils.lib.eachDefaultSystem (
2025-02-01 19:03:29 +02:00
system:
let
2023-06-13 00:07:14 +03:00
pkgs = import nixpkgs {
inherit system;
};
# Needed on non linux systems since docker runs a linux vm
2023-07-26 03:23:33 +03:00
dockerCallPackage =
if pkgs.stdenv.isLinux
then pkgs.callPackage
else pkgs.pkgsCross."${pkgs.stdenv.hostPlatform.uname.processor}-multiplatform".callPackage;
2023-06-13 00:07:14 +03:00
in
2025-02-01 19:03:29 +02:00
with pkgs; {
devShells.default = mkShell {
buildInputs = [
ffmpeg
openssl
pkg-config
go
];
};
packages = {
default = callPackage ./server/build.nix { };
livestream-server = callPackage ./server/build.nix { };
livestream-admincli = callPackage ./admincli/build.nix { };
2025-02-01 19:03:29 +02:00
docker = callPackage ./docker.nix {
default = dockerCallPackage ./build.nix { };
2023-07-26 03:23:33 +03:00
inherit nix2container;
};
2025-02-01 19:03:29 +02:00
};
}
2023-06-13 00:07:14 +03:00
);
2023-07-26 03:23:33 +03:00
}