56 lines
1.2 KiB
Nix
56 lines
1.2 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
bun2nix.url = "github:nix-community/bun2nix";
|
|
bun2nix.inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
bun2nix,
|
|
}:
|
|
let
|
|
systems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
];
|
|
forAll = nixpkgs.lib.genAttrs systems;
|
|
in
|
|
{
|
|
packages = forAll (
|
|
system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
bun2nix' = bun2nix.packages.${system}.default;
|
|
in
|
|
{
|
|
default = bun2nix'.mkDerivation (finalAttrs: {
|
|
pname = "gloomberb";
|
|
version = "0.14.1";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "gloom-sh";
|
|
repo = "gloomberb";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-CyDsbs379G3qBDS0rCojr/L7TwWYgrXo0KslvNBu3gA=";
|
|
};
|
|
|
|
bunDeps = bun2nix'.fetchBunDeps {
|
|
bunNix = ./bun.nix;
|
|
};
|
|
|
|
bunInstallFlags = [
|
|
"--frozen-lockfile"
|
|
];
|
|
|
|
module = "src/index.tsx";
|
|
|
|
bunCompileToBytecode = false;
|
|
});
|
|
}
|
|
);
|
|
};
|
|
}
|