create container

This commit is contained in:
stubbfelnewpc
2020-07-07 22:35:17 +02:00
parent ffbb5ce424
commit 13b50650fa
3 changed files with 71 additions and 37 deletions

View File

@@ -1,4 +1,5 @@
{
# nix-shell --expr 'with import <nixpkgs> {}; callPackage start_ide.nix {}' --pure --run run_ide.sh
{
pkgs ? import <nixpkgs> {},
listenAddress ? "0.0.0.0",
listenPort ? 3000,
@@ -11,19 +12,19 @@ let
nodejs = pkgs.nodejs-10_x;
yarn' = pkgs.yarn.override { inherit nodejs; };
theiaideBuildDependencies = [
pkgs.nano
pkgs.curl
yarn'
pkgs.nano
pkgs.curl
yarn'
nodejs
pkgs.python27Full
pkgs.git
pkgs.wget
pkgs.lzma
pkgs.python27Full
pkgs.git
pkgs.wget
pkgs.lzma
pkgs.gcc
pkgs.gnumake
pkgs.gccStdenv
pkgs.binutils
pkgs.gnupg
pkgs.gnupg
];
projectDependencies = [
@@ -33,15 +34,15 @@ let
pkgs.clippy
pkgs.rustfmt
pkgs.rustup
];
];
theiaidePackageConfig = {
private= true;
theia.frontend.config.applicationName = "DevelNixos";
dependencies = {
theia.frontend.config.applicationName = "DevelNixos";
dependencies = {
"@theia/callhierarchy" = "latest";
"@theia/console" = "latest";
"@theia/core" = "latest";
"@theia/core" = "latest";
"@theia/editor" = "latest";
"@theia/editor-preview" = "latest";
"@theia/file-search" = "latest";
@@ -74,7 +75,7 @@ let
"@theia/vsx-registry" = "latest";
"@theia/workspace" = "latest";
};
theiaPlugins = {
theiaPlugins = {
vscode-builtin-json = "https://open-vsx.org/api/vscode/json/1.46.1/file/vscode.json-1.46.1.vsix";
vscode-json-language-features = "https://open-vsx.org/api/vscode/json-language-features/1.46.1/file/vscode.json-language-features-1.46.1.vsix";
vscode-builtin-markdown = "https://open-vsx.org/api/vscode/markdown/1.46.1/file/vscode.markdown-1.46.1.vsix";
@@ -129,7 +130,7 @@ let
Description=nixide service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
@@ -146,7 +147,7 @@ let
base_clean_file = pkgs.writeText "clean-nixide.service" ''
[Unit]
Description= nixide clean service
[Service]
Type=Oneshot
Restart=always
@@ -166,7 +167,7 @@ let
sed -i "s|PROJECT_FOLDER_PLACE_HOLDER|$PROJECT_FOLDER|g" $NIXIDE_SERVICE_NAME.service
sed -i "s|WORKING_DIRECTORY_PLACE_HOLDER|$WORKING_FOLDER|g" $NIXIDE_SERVICE_NAME.service
sed -i "s|PWD_PLACE_HOLDER|$PWD|g" $NIXIDE_SERVICE_NAME.service
cp -f ${base_clean_file} clean-$NIXIDE_SERVICE_NAME.service
sed -i "s|THEIA_IDE_APP_FOLDER_PLACE_HOLDER|$THEIA_IDE_APP_FOLDER|g" clean-$NIXIDE_SERVICE_NAME.service
sed -i "s|WORKING_DIRECTORY_PLACE_HOLDER|$WORKING_FOLDER|g" clean-$NIXIDE_SERVICE_NAME.service