mirror of
https://github.com/versia-pub/frontend.git
synced 2026-06-14 07:29:15 +02:00
build: 🏗️ Add Nix build
Some checks failed
Some checks failed
This commit is contained in:
parent
40bb2cc7dc
commit
5fdf31a717
6 changed files with 11118 additions and 0 deletions
57
flake.nix
Normal file
57
flake.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
description = "Versia Frontend";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
{
|
||||
overlays.default = final: prev: {
|
||||
versia-fe = final.callPackage ./nix/package.nix {};
|
||||
};
|
||||
}
|
||||
// flake-utils.lib.eachSystem ["x86_64-linux" "aarch64-linux"] (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [self.overlays.default];
|
||||
};
|
||||
in {
|
||||
packages = {
|
||||
inherit (pkgs) versia-fe;
|
||||
default = self.packages.${system}.versia-fe;
|
||||
};
|
||||
})
|
||||
// flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [self.overlays.default];
|
||||
};
|
||||
in {
|
||||
devShells = {
|
||||
default = pkgs.mkShell rec {
|
||||
libPath = with pkgs;
|
||||
lib.makeLibraryPath [
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
LD_LIBRARY_PATH = "${libPath}";
|
||||
buildInputs = with pkgs; [
|
||||
bun
|
||||
nodejs
|
||||
vips
|
||||
pnpm
|
||||
nodePackages.typescript
|
||||
nodePackages.typescript-language-server
|
||||
nix-ld
|
||||
];
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue