just some rabbits

This commit is contained in:
Adam Avramov 2020-08-16 12:37:31 +02:00
commit 7cf9a7095e
10 changed files with 2529 additions and 0 deletions

19
Dotgrid.main.js Normal file
View file

@ -0,0 +1,19 @@
const { app, BrowserWindow } = require('electron')
function createWindow () {
// Create the browser window.
const win = new BrowserWindow({
width: 800,
height: 600,
//autoHideMenuBar: true,
menuBarVisible: false,
webPreferences: {
nodeIntegration: true,
}
})
// and load the index.html of the app.
win.loadFile('index.html')
}
app.whenReady().then(createWindow)

39
Left.package.json Normal file
View file

@ -0,0 +1,39 @@
{
"name": "Left",
"productName": "Left",
"version": "0.1.0",
"main": "main.js",
"scripts": {
"start": "electron . --disable-gpu",
"time": "node time.js",
"docs": "node ../docs.js",
"fix": "standard --fix",
"clean": "rm -r ~/Documents/Left-darwin-x64/ ; rm -r ~/Documents/Left-linux-x64/ ; rm -r ~/Documents/Left-win32-x64/ ; echo 'cleaned build location'",
"build_osx": "electron-packager . Left --platform=darwin --arch=x64 --out ~/Documents/ --overwrite --icon=icon.icns ; echo 'Built for OSX'",
"build_linux": "electron-packager . Left --platform=linux --arch=x64 --out ~/Documents/ --overwrite --icon=icon.ico ; echo 'Built for LINUX'",
"build_win": "electron-packager . Left --platform=win32 --arch=x64 --out ~/Documents/ --overwrite --icon=icon.ico ; echo 'Built for WIN'",
"build": "npm run clean ; npm run build_osx ; npm run build_linux ; npm run build_win",
"push_osx": "~/Applications/butler push ~/Documents/Left-darwin-x64/ hundredrabbits/left:osx-64",
"push_linux": "~/Applications/butler push ~/Documents/Left-linux-x64/ hundredrabbits/left:linux-64",
"push_win": "~/Applications/butler push ~/Documents/Left-win32-x64/ hundredrabbits/left:windows-64",
"status": "~/Applications/butler status hundredrabbits/left",
"push": "npm run build ; npm run push_osx ; npm run push_linux ; npm run push_win ; npm run clean ; npm run status"
},
"devDependencies": {
},
"standard": {
"globals": [
"terminal",
"localStorage",
"DOMParser",
"onMessage",
"postMessage",
"FileReader",
"performance",
"Worker"
],
"ignore": [
"/node_modules/*"
]
}
}

1057
Left.yarn.lock Normal file

File diff suppressed because it is too large Load diff

23
Marabu.package.json Normal file
View file

@ -0,0 +1,23 @@
{
"name": "Marabu",
"version": "0.1.0",
"main": "main.js",
"scripts": {
"start": "electron .",
"clean" : "rm -r ~/Desktop/Marabu-darwin-x64/ ; rm -r ~/Desktop/Marabu-linux-x64/ ; rm -r ~/Desktop/Marabu-win32-x64/ ; echo 'cleaned build location'",
"build_osx" : "electron-packager . Marabu --platform=darwin --arch=x64 --out ~/Desktop/ --overwrite --icon=icon.icns ; echo 'Built for OSX'",
"build_linux" : "electron-packager . Marabu --platform=linux --arch=x64 --out ~/Desktop/ --overwrite --icon=icon.ico ; echo 'Built for LINUX'",
"build_win" : "electron-packager . Marabu --platform=win32 --arch=x64 --out ~/Desktop/ --overwrite --icon=icon.ico ; echo 'Built for WIN'",
"build" : "npm run clean ; npm run build_osx ; npm run build_linux ; npm run build_win",
"push_osx" : "~/butler push ~/Desktop/Marabu-darwin-x64/ hundredrabbits/marabu:osx-64",
"push_linux" : "~/butler push ~/Desktop/Marabu-linux-x64/ hundredrabbits/marabu:linux-64",
"push_win" : "~/butler push ~/Desktop/Marabu-win32-x64/ hundredrabbits/marabu:windows-64",
"push_theme" : "~/butler push ~/Github/HundredRabbits/Themes/themes/ hundredrabbits/marabu:themes",
"push_status" : "~/butler status hundredrabbits/marabu",
"push" : "npm run build ; npm run push_theme ; npm run push_osx ; npm run push_linux ; npm run push_win ; npm run clean ; npm run push_status"
},
"devDependencies": {
},
"dependencies": {
}
}

0
Marabu.yarn.lock Normal file
View file

1104
Orca.yarn.lock Normal file

File diff suppressed because it is too large Load diff

26
Pilot.package.json Normal file
View file

@ -0,0 +1,26 @@
{
"name": "Pilot",
"version": "0.1.0",
"main": "main.js",
"scripts": {
"start": "electron .",
"time": "node time.js",
"docs": "node ../docs.js",
"fix": "standard --fix",
"clean": "rm -r ~/Desktop/Pilot-darwin-x64/ ; rm -r ~/Desktop/Pilot-linux-x64/ ; rm -r ~/Desktop/Pilot-win32-x64/ ; echo 'cleaned build location'",
"build_osx": "electron-packager . Pilot --platform=darwin --arch=x64 --out ~/Desktop/ --overwrite --icon=icon.icns ; echo 'Built for OSX'",
"build_linux": "electron-packager . Pilot --platform=linux --arch=x64 --out ~/Desktop/ --overwrite --icon=icon.ico ; echo 'Built for LINUX'",
"build_win": "electron-packager . Pilot --platform=win32 --arch=x64 --out ~/Desktop/ --overwrite --icon=icon.ico ; echo 'Built for WIN'",
"build": "npm run clean ; npm run build_osx ; npm run build_linux ; npm run build_win",
"push_osx": "~/butler push ~/Desktop/Pilot-darwin-x64/ hundredrabbits/pilot:osx-64",
"push_linux": "~/butler push ~/Desktop/Pilot-linux-x64/ hundredrabbits/pilot:linux-64",
"push_win": "~/butler push ~/Desktop/Pilot-win32-x64/ hundredrabbits/pilot:windows-64",
"push_status": "~/butler status hundredrabbits/pilot",
"push": "npm run build ; npm run push_osx ; npm run push_linux ; npm run push_win ; npm run clean ; npm run push_status"
},
"devDependencies": {
},
"dependencies": {
"tone": "^13.4.9"
}
}

8
Pilot.yarn.lock Normal file
View file

@ -0,0 +1,8 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
tone@^13.4.9:
version "13.4.9"
resolved "https://registry.yarnpkg.com/tone/-/tone-13.4.9.tgz#c5e9f69d0cdea6d2fa03e108766b10d5f9185dde"
integrity sha512-jU3MJOzt9wcGbo57TIzgAQe13EgwvdC7N6N/cA6ZkGYHH8gop+L6a87NRP3LIBCcJxVps6I6i/39ZUJI2aCWUA==

19
Ronin.main.js Normal file
View file

@ -0,0 +1,19 @@
const { app, BrowserWindow } = require('electron')
function createWindow () {
// Create the browser window.
const win = new BrowserWindow({
width: 800,
height: 600,
//autoHideMenuBar: true,
menuBarVisible: false,
webPreferences: {
nodeIntegration: true,
}
})
// and load the index.html of the app.
win.loadFile('index.html')
}
app.whenReady().then(createWindow)

234
default.nix Normal file
View file

@ -0,0 +1,234 @@
{ lib, newScope, stdenv, pkgs, callPackage }: lib.makeScope newScope (self: {
dotgrid = callPackage ({ pkgs, stdenv, electron_8 }: let
electron = electron_8;
rev = "e848fa0e4f5f4826a5b03085106bb37f1e97735b";
sha256 = "1gqx1pbmz2qf2gi98aaifbgw4lksy7yykxnfz3j90zqv9l11dgh6";
src = pkgs.fetchFromGitHub {
owner = "hundredrabbits";
repo = "Dotgrid";
inherit rev sha256;
};
in stdenv.mkDerivation {
name = "dotgrid-${rev}";
inherit src;
buildInputs = [ electron_8 ];
phases = [ "buildPhase" ];
buildPhase = ''
mkdir -p $out/lib/dotgrid
cp -r $src/* $out/lib/dotgrid
echo '{"main":"main.js"}' > $out/lib/dotgrid/package.json
cat ${./Dotgrid.main.js} > $out/lib/dotgrid/main.js
mkdir -p $out/bin
echo '#!/bin/sh' > $out/bin/dotgrid
echo "${electron}/bin/electron $out/lib/dotgrid" >> $out/bin/dotgrid
chmod +x $out/bin/dotgrid
'';
}) {};
left = callPackage ({ pkgs, stdenv, electron_7, mkYarnPackage }: let
electron = electron_7;
rev = "f944beea8791c0dcb551f7c61a66b9a1ccefbbe6";
sha256 = "1y6xan6k68fdmp95caar75phf8qi9pd2g3ja1608vh6bi8la2yc3";
src = pkgs.fetchFromGitHub {
owner = "hundredrabbits";
repo = "Left";
inherit rev sha256;
};
in mkYarnPackage rec {
name = "left-${rev}";
inherit src;
packageJSON = ./Left.package.json;
yarnLock = ./Left.yarn.lock;
buildInputs = [ electron ];
pname = "Left";
installPhase = ''
ls -al
runHook preInstall
mkdir -p $out/{bin,libexec/${pname}}
mv node_modules $out/libexec/${pname}/node_modules
mv deps $out/libexec/${pname}/deps
runHook postInstall
'';
distPhase = ''
cd $out
unlink "$out/libexec/Left/deps/Left/node_modules"
ln -s "$out/libexec/Left/node_modules" "$out/libexec/Left/deps/Left/desktop/node_modules"
ls -al
ls -al libexec
mkdir -p bin
cd bin
echo '#!/bin/sh' > left
echo "cd $out/libexec/Left/deps/Left" >> left
echo "${electron}/bin/electron $out/libexec/Left/deps/Left/desktop" >> left
chmod 0755 $out/bin/left
true
'';
}) {};
orca = callPackage ({ pkgs, stdenv, electron_8, mkYarnPackage }: let
electron = electron_8;
rev = "d469077";
sha256 = "0gj78akn0yi9mvg08gi3761bh0dh38bvd5fs7kz35vp8w9szb04s";
src = pkgs.fetchFromGitHub {
owner = "hundredrabbits";
repo = "Orca";
inherit rev sha256;
};
in mkYarnPackage rec {
name = "orca-${rev}";
inherit src;
packageJSON = src + "/desktop/package.json";
yarnLock = ./Orca.yarn.lock;
buildInputs = [ electron ];
pname = "Orca";
installPhase = ''
ls -al
runHook preInstall
mkdir -p $out/{bin,libexec/${pname}}
mv node_modules $out/libexec/${pname}/node_modules
mv deps $out/libexec/${pname}/deps
runHook postInstall
'';
distPhase = ''
cd $out
unlink "$out/libexec/${pname}/deps/${pname}/node_modules"
ln -s "$out/libexec/${pname}/node_modules" "$out/libexec/${pname}/deps/${pname}/desktop/node_modules"
ls -al
ls -al libexec
mkdir -p bin
cd bin
echo '#!/bin/sh' > orca-osc
echo "cd $out/libexec/${pname}/deps/${pname}" >> orca-osc
echo "${electron}/bin/electron $out/libexec/${pname}/deps/${pname}/desktop" >> orca-osc
chmod 0755 $out/bin/orca-osc
true
'';
}) {};
marabu = callPackage ({ pkgs, stdenv, electron, mkYarnPackage }: let
rev = "e22e203d97af2347c7130e7c4a9c62d4067d5a5a";
sha256 = "1ynbz269i0hnd35q9jf36kq10lkr294x8719nq0m0f8wd6b5hhcv";
src = pkgs.fetchFromGitHub {
owner = "hundredrabbits";
repo = "Marabu";
inherit rev sha256;
};
in mkYarnPackage rec {
name = "marabu-${rev}";
inherit src;
packageJSON = ./Marabu.package.json;
yarnLock = ./Marabu.yarn.lock;
buildInputs = [ electron ];
pname = "Marabu";
installPhase = ''
ls -al
runHook preInstall
mkdir -p $out/{bin,libexec/${pname}}
mv node_modules $out/libexec/${pname}/node_modules
mv deps $out/libexec/${pname}/deps
runHook postInstall
'';
distPhase = ''
cd $out
unlink "$out/libexec/${pname}/deps/${pname}/node_modules"
ln -s "$out/libexec/${pname}/node_modules" "$out/libexec/${pname}/deps/${pname}/desktop/node_modules"
ls -al
ls -al libexec
mkdir -p bin
cd bin
echo '#!/bin/sh' > marabu
echo "cd $out/libexec/${pname}/deps/${pname}" >> marabu
echo "${electron}/bin/electron $out/libexec/${pname}/deps/${pname}/desktop" >> marabu
chmod 0755 $out/bin/marabu
true
'';
}) {};
pilot = callPackage ({ pkgs, stdenv, electron_5, mkYarnPackage }: let
electron = electron_5;
rev = "3a2afc0ca9d9d09b008de1410b7f08cad92036c6";
sha256 = "1pd1zgsyfh83lvwnzmn4krnrp0m54aw10253ckjpqkz8j8va84j3";
src = pkgs.fetchFromGitHub {
owner = "hundredrabbits";
repo = "Pilot";
inherit rev sha256;
};
in mkYarnPackage rec {
name = "pilot-${rev}";
inherit src;
packageJSON = ./Pilot.package.json;
yarnLock = ./Pilot.yarn.lock;
buildInputs = [ electron ];
pname = "Pilot";
installPhase = ''
ls -al
runHook preInstall
mkdir -p $out/{bin,libexec/${pname}}
mv node_modules $out/libexec/${pname}/node_modules
mv deps $out/libexec/${pname}/deps
runHook postInstall
'';
distPhase = ''
cd $out
unlink "$out/libexec/${pname}/deps/${pname}/node_modules"
ln -s "$out/libexec/${pname}/node_modules" "$out/libexec/${pname}/deps/${pname}/desktop/node_modules"
ls -al
ls -al libexec
mkdir -p bin
cd bin
echo '#!/bin/sh' > pilot-osc
echo "cd $out/libexec/${pname}/deps/${pname}" >> pilot-osc
echo "${electron}/bin/electron $out/libexec/${pname}/deps/${pname}/desktop" >> pilot-osc
chmod 0755 $out/bin/pilot-osc
true
'';
}) {};
ronin = callPackage ({ pkgs, stdenv, electron_8 }: let
electron = electron_8;
rev = "e375668143f8f12b98fa81e3efe7bccae78ce432";
sha256 = "19mh62fbs2rryrch32cb1jnwckzd731w4131qb921qwz949ygiqf";
src = pkgs.fetchFromGitHub {
owner = "hundredrabbits";
repo = "Ronin";
inherit rev sha256;
};
in stdenv.mkDerivation {
name = "ronin-${rev}";
inherit src;
buildInputs = [ electron_8 ];
phases = [ "buildPhase" ];
buildPhase = ''
mkdir -p $out/lib/ronin
cp -r $src/* $out/lib/ronin
echo '{"main":"main.js"}' > $out/lib/ronin/package.json
cat ${./Ronin.main.js} > $out/lib/ronin/main.js
mkdir -p $out/bin
echo '#!/bin/sh' > $out/bin/ronin
echo "${electron}/bin/electron $out/lib/ronin" >> $out/bin/ronin
chmod +x $out/bin/ronin
'';
}) {};
})