1
0
mirror of https://github.com/spacebarchat/client.git synced 2024-11-21 18:02:32 +01:00
client/flake.nix

43 lines
1.2 KiB
Nix
Raw Normal View History

2023-04-22 16:07:51 +02:00
{
description = "Spacebar client, written in React.";
2023-04-23 16:19:07 +02:00
#inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
2023-04-22 16:07:51 +02:00
inputs.flake-utils.url = "github:numtide/flake-utils";
2023-04-23 16:19:07 +02:00
#inputs.pnpm2nix.url = "github:TheArcaneBrony/pnpm2nix";
2023-04-22 16:07:51 +02:00
#inputs.pnpm2nix.url = "path:/home/root@Rory/git/spacebar/client/pnpm2nix";
2023-04-23 16:19:07 +02:00
#inputs.pnpm2nix.flake = false;
inputs.nixpkgs.url = "github:lilyinstarlight/nixpkgs/unheck/nodejs";
2023-04-22 16:07:51 +02:00
2023-04-23 16:19:07 +02:00
outputs = { self, nixpkgs, flake-utils }:
2023-04-22 16:07:51 +02:00
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
2023-04-23 16:19:07 +02:00
#_pnpm2nix = import pnpm2nix { pkgs = nixpkgs.legacyPackages.${system}; };
2023-04-22 16:07:51 +02:00
in rec {
2023-04-23 16:19:07 +02:00
#packages.default = _pnpm2nix.mkPnpmPackage {
packages.default = pkgs.buildNpmPackage {
pname = "spacebar-client-react";
2023-04-22 16:07:51 +02:00
src = ./.;
2023-04-23 16:19:07 +02:00
name = "spacebar-client-react";
2023-04-24 14:52:04 +02:00
#buildInputs = with pkgs; [ ];
npmDepsHash = "sha256-BAsUdPWJk8/QVaRjOELusOf3TGoft4o90FJ11ef3xJE=";
2023-04-23 16:19:07 +02:00
makeCacheWritable = true;
installPhase = ''
runHook preInstall
2024-02-28 04:33:54 +01:00
cp -r dist $out/
runHook postInstall
'';
2023-04-22 16:07:51 +02:00
};
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs
nodePackages.pnpm
nodePackages.typescript
];
};
}
);
}