Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/svelterust/bix
Use Nix to build project and run it with Bun
https://github.com/svelterust/bix
bun flake nix
Last synced: about 1 month ago
JSON representation
Use Nix to build project and run it with Bun
- Host: GitHub
- URL: https://github.com/svelterust/bix
- Owner: svelterust
- Created: 2023-09-02T10:22:04.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-13T11:39:04.000Z (7 months ago)
- Last Synced: 2024-11-24T16:17:33.933Z (about 1 month ago)
- Topics: bun, flake, nix
- Language: Nix
- Homepage:
- Size: 8.79 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bix
For `bun` you need a `yarn.lock`, make sure to install that automatically with following in `~/.bunfig.toml`:
```toml
[install.lockfile]
print = "yarn"```
# Use `bun`
```nix
{
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`
```nix
{
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
```nix
{
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"];
};
};
};
}
```