-
Notifications
You must be signed in to change notification settings - Fork 100
/
flake.nix
42 lines (40 loc) · 1.18 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
description = "Spacebar client, written in React.";
#inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
inputs.flake-utils.url = "github:numtide/flake-utils";
#inputs.pnpm2nix.url = "github:TheArcaneBrony/pnpm2nix";
#inputs.pnpm2nix.url = "path:/home/root@Rory/git/spacebar/client/pnpm2nix";
#inputs.pnpm2nix.flake = false;
inputs.nixpkgs.url = "github:lilyinstarlight/nixpkgs/unheck/nodejs";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
#_pnpm2nix = import pnpm2nix { pkgs = nixpkgs.legacyPackages.${system}; };
in rec {
#packages.default = _pnpm2nix.mkPnpmPackage {
packages.default = pkgs.buildNpmPackage {
pname = "spacebar-client-react";
src = ./.;
name = "spacebar-client-react";
#buildInputs = with pkgs; [ ];
npmDepsHash = "sha256-BAsUdPWJk8/QVaRjOELusOf3TGoft4o90FJ11ef3xJE=";
makeCacheWritable = true;
installPhase = ''
runHook preInstall
cp -r dist $out/
runHook postInstall
'';
};
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs
nodePackages.pnpm
nodePackages.typescript
];
};
}
);
}