frontend/flake.nix
Jesse Wierzbinski 5fdf31a717
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 1s
Deploy to GitHub Pages / build (push) Failing after 1s
Deploy to GitHub Pages / deploy (push) Has been skipped
Docker / build (push) Failing after 0s
Mirror to Codeberg / Mirror (push) Failing after 1s
build: 🏗️ Add Nix build
2025-04-15 15:36:34 +02:00

58 lines
1.3 KiB
Nix

{
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
];
};
};
});
}