smo-proximity-chat/flake.nix

65 lines
1.6 KiB
Nix

{
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,
pnpm2nix-nzbr,
}:
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;
packages.default = with pkgs;
pkgs.buildNpmPackage rec {
pname = "proximity-chat";
version = "0.0.1";
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;
};
}
);
}