From 96c39db639911de7e74df4fc1892ef46b5657851 Mon Sep 17 00:00:00 2001 From: ltadeu6 Date: Mon, 24 Nov 2025 04:16:49 -0300 Subject: [PATCH] shell.nix --- .gitignore | 20 ++------------------ config.xml | 3 +++ env.sh | 12 ++++++++++++ shell.nix | 22 ++++++++++++++++++++++ www/index.css | 3 ++- www/index.html | 2 +- 6 files changed, 42 insertions(+), 20 deletions(-) create mode 100755 env.sh create mode 100644 shell.nix diff --git a/.gitignore b/.gitignore index 0daec5c..371272d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,22 +1,6 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. .DS_Store +.gradle/ # Generated by package manager node_modules/ @@ -46,4 +30,4 @@ package-lock.json *.synctex.gz *.fdb_latexmk *.fls -*.ipynb_checkpoints* \ No newline at end of file +*.ipynb_checkpoints* diff --git a/config.xml b/config.xml index ce54cfa..64a6b84 100644 --- a/config.xml +++ b/config.xml @@ -16,5 +16,8 @@ + + + diff --git a/env.sh b/env.sh new file mode 100755 index 0000000..8c35b5e --- /dev/null +++ b/env.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +export ANDROID_HOME="$HOME/Android/Sdk" +export ANDROID_SDK_ROOT="$HOME/Android/Sdk" +export PATH="$ANDROID_HOME/cmdline-tools/latest/bin:$PATH" +export PATH="$ANDROID_HOME/platform-tools:$PATH" +export PATH="$ANDROID_HOME/emulator:$PATH" + +# Isolar o cache do Gradle para evitar conflitos. +export GRADLE_USER_HOME=$(pwd)/.gradle + +cordova run android diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..19e749d --- /dev/null +++ b/shell.nix @@ -0,0 +1,22 @@ +{ pkgs ? import {} }: + + pkgs.mkShell { + # Nome do ambiente + name = "cordova-deps-shell"; + + # Lista de pacotes a serem instalados. Nada mais. + # O Nix garantirá que 'node', 'cordova', 'gradle' e 'java' + # estejam disponíveis no seu PATH quando você entrar no shell. + buildInputs = with pkgs; [ + nodejs + cordova + gradle + jdk + ]; + + # Mensagem simples para confirmar que você está no ambiente certo. + shellHook = '' + echo "Ambiente Nix com dependências do Cordova ativado." + echo "Execute 'source ./env.sh' para configurar o Android SDK." + ''; + } diff --git a/www/index.css b/www/index.css index d871704..f9d4e50 100644 --- a/www/index.css +++ b/www/index.css @@ -12,8 +12,9 @@ } body { + width: 800px; font-family: "Poppins", sans-serif; - margin: 0; + margin: 0 auto; padding: 20px; text-align: center; /* Centraliza o texto da página */ background-image: linear-gradient(-45deg, var(--bg-start), var(--bg-end)); diff --git a/www/index.html b/www/index.html index 3fb1053..c124531 100644 --- a/www/index.html +++ b/www/index.html @@ -6,7 +6,7 @@ BioLab Parameter Explorer - +