46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{
|
|
description = "React-native test";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
outputs =
|
|
{ nixpkgs, flake-utils, ... }:
|
|
flake-utils.lib.eachDefaultSystem (
|
|
system:
|
|
let
|
|
inherit (pkgs.lib) optional optionals;
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
in
|
|
with pkgs;
|
|
{
|
|
devShell = pkgs.mkShell {
|
|
buildInputs =
|
|
[
|
|
bashInteractive
|
|
glibcLocales
|
|
git
|
|
nodejs
|
|
pnpm
|
|
postgresql
|
|
jdk17
|
|
]
|
|
++ optional stdenv.isLinux inotify-tools
|
|
++ optional stdenv.isDarwin terminal-notifier
|
|
++ optionals stdenv.isDarwin (
|
|
with darwin.apple_sdk.frameworks;
|
|
[
|
|
CoreFoundation
|
|
CoreServices
|
|
]
|
|
);
|
|
shellHook = ''
|
|
[ -z $CONTAINER_ID ] && distrobox enter archlinux
|
|
[ -z $CONTAINER_ID ] || source ./scripts/init-vm.sh
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
}
|