Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

bix

For bun you need a yarn.lock, make sure to install that automatically with following in ~/.bunfig.toml:

[install.lockfile]
print = "yarn"

Use bun

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    bix = {
      url = "github:knarkzel/bix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { bix, ... }: {
    packages.x86_64-linux = bix.buildBunPackage {
      src = ./.;
      packages = ./package.json;
      hash = "run-nix-build-for-the-hash";
    };
  };
}

Use node

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    bix = {
      url = "github:knarkzel/bix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { bix, ... }: {
    packages.x86_64-linux = bix.buildNodePackage {
      src = ./.;
      packages = ./package.json;
      hash = "run-nix-build-for-the-hash";
    };
  };
}

Fix issue building vips when using sharp

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    bix = {
      url = "github:knarkzel/bix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { nixpkgs, bix, ... }: let
    system = "x86_64-linux";
    pkgs = import nixpkgs {
      inherit system;
    };
  in {
    packages.x86_64-linux = bix.buildNodePackage {
      src = ./.;
      packages = ./package.json;
      hash = "run-nix-build-for-the-hash";
      config = {
        buildInputs = [pkgs.vips];
        nativeBuildInputs = [pkgs.pkg-config pkgs.python3];
        npmInstallFlags = ["--build-from-source"];
      };
    };
  };
}

About

Use Nix to build project and run it with Bun

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Contributors

Languages