2024-12-21 06:21:14 -05:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
pnpm2nix-nzbr = {
|
|
|
|
url = "github:nzbr/pnpm2nix-nzbr";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
flake-utils,
|
2024-12-22 13:59:06 -05:00
|
|
|
pnpm2nix-nzbr,
|
2024-12-21 06:21:14 -05:00
|
|
|
}:
|
|
|
|
flake-utils.lib.eachDefaultSystem
|
|
|
|
(
|
|
|
|
system: let
|
|
|
|
overlays = [pnpm2nix-nzbr.overlays.default];
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system overlays;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
with pkgs; {
|
|
|
|
devShells.default = mkShell {
|
|
|
|
buildInputs = [
|
|
|
|
pkgs.fenix.stable.completeToolchain
|
|
|
|
pkg-config
|
|
|
|
openssl
|
|
|
|
];
|
|
|
|
};
|
|
|
|
formatter = pkgs.alejandra;
|
2024-12-22 13:59:06 -05:00
|
|
|
packages.default = with pkgs;
|
|
|
|
pkgs.buildNpmPackage rec {
|
|
|
|
pname = "proximity-chat";
|
|
|
|
version = "0.0.1";
|
2024-12-21 06:21:14 -05:00
|
|
|
|
2024-12-22 13:59:06 -05:00
|
|
|
src = ./.;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
nodejs
|
|
|
|
];
|
|
|
|
|
|
|
|
npmConfigHook = pnpm.configHook;
|
|
|
|
npmDeps = pnpmDeps;
|
|
|
|
pnpmDeps = pnpm.fetchDeps {
|
|
|
|
inherit pname src version;
|
|
|
|
hash = "sha256-poIplBUrw5cpLyinONDWCVMLdGoHTwq6gFbmALM3qps=";
|
|
|
|
};
|
|
|
|
|
|
|
|
# buildPhase = ''
|
|
|
|
# runHook preBuild
|
|
|
|
# pnpm build --outDir $out --base /dev --sourcemap "inline"
|
|
|
|
# runHook postBuild
|
|
|
|
# '';
|
|
|
|
|
|
|
|
# installInPlace = true;
|
|
|
|
};
|
2024-12-21 06:21:14 -05:00
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|