/rokudev-nix

Nix package repository for development tools for the Roku platform

Primary LanguageNix

Nix Flake: Roku development tools

Packages included:

Usage

With Flakes

Add this repo to your flake.nix inputs like:

{
  # ...
  inputs.roku-devtools.url = "github:thelonelyghost/roku-devtools-nix";
  # ...

  outputs = { self, nixpkgs, flake-utils, roku-devtools, ...}@attrs:
    flake-utils.lib.eachDefaultSystem (system: let
      pkgs = import nixpkgs {
        inherit system;
      };
      roku = roku-devtools.packages."${system}";
    in {
      devShell = pkgs.mkShell {
        nativeBuildInputs = [
          pkgs.bashInteractive
          roku.brighterscript
        ];
      };
    });
}

Updating: Anytime you want to update what roku-devtools offers, run nix flake lock --update-input roku-devtools and rebuild your nix expression acccordingly.

Without Flakes

If you're not yet using Nix Flakes, such as with home-manager, here's how you can include it:

  1. Install niv and run niv init
  2. Run niv add thelonelyghost/roku-devtools-nix --name roku-devtools
  3. Include the following in your code:
{ lib, config, ... }:

let
  sources = import ./nix/sources.nix {};
  pkgs = import sources.nixpkgs {};

  roku = (import (pkgs.fetchFromGitHub { inherit (sources.roku-devtools) owner repo rev sha256; })).outputs.packages."${builtins.currentSystem}";
in
{
  home.packages = [
    roku.brighterscript
  ];
}

Updating: Anytime you want to update what roku-devtools offers, run niv update roku-devtools-nix and rebuild your nix expression acccordingly.