Commit 103a282a authored by Timon Stampfli's avatar Timon Stampfli

Merge branch 'githack-deko' into 'master'

nix config and collect old soiworkspaces

See merge request !15
parents cd5f25f1 eb36aa53
Pipeline #5695 passed with stages
in 39 seconds
......@@ -10,3 +10,4 @@ tslint.json
helper/**
out
node_modules
data
\ No newline at end of file
let
pinnedPkgs = import (/home/timon/rep/config/config-pin.nix);
desktopUnstablePkgs = pinnedPkgs.desktop-unstable {
config.pulseaudio = true;
config.allowUnfree = true;
};
pkgs = desktopUnstablePkgs;
version = "0.8.30";
helperBinary = pkgs.buildGoPackage rec {
name = "helperbinary-${version}";
src = ./.;
goPackagePath = [ "git.dolansoft.org/timon/soicode" ];
goDeps = ./helper/deps.nix;
};
soicodePlugin = pkgs.vscode-utils.buildVscodeExtension {
name = "soicode-${version}";
vscodeExtUniqueId = "swissolyinfo.soicode";
src = ./.;
buildInputs = [ pkgs.nodejs pkgs.stdenv pkgs.go ];
configurePhase = "patchShebangs node_modules";
buildPhase = ''
cp ${helperBinary}/bin/helper ./dist/helper-linux-amd64
npm run build-package
'';
meta = with pkgs.stdenv.lib; {
license = licenses.mit;
platforms = [ "x86_64-linux" ];
};
};
codiumPlugins = pkgs.buildEnv {
name = "codium-extensions";
paths = (pkgs.vscode-utils.extensionsFromVscodeMarketplace [{
name = "vim";
publisher = "vscodevim";
version = "1.12.2";
sha256 = "1a4r07xijrnz7bxkkpl2njwv2128hcwvmqvmirw4v41paw559231";
}]) ++ [ pkgs.vscode-extensions.ms-vscode.cpptools ] ++ [ (soicodePlugin) ];
};
codiumCommand = (pkgs.writeScriptBin "coTest" ''
#!${pkgs.stdenv.shell}
exec ${pkgs.vscodium}/bin/codium --extensions-dir ${codiumPlugins}/share/vscode/extensions $@
'');
in pkgs.mkShell { buildInputs = [ (codiumCommand) ]; }
#include <soi>
signed main() {
int a = read_int();
int b = read_int();
int answer = a + b;
print(answer);
}
[sample.01]
input="""
2
3
"""
output="""
5
"""
[sample.02]
input="""
700000000000000000
300000000000000000
"""
output="""
1000000000000000000
"""
{
"workspace": { "templateVersion": "0.8.0" },
"settings": {
"compilerPath": "/home/timon/.nix-profile/bin/g++",
"debuggerPath": "/home/timon/.nix-profile/bin/gdb",
"cppHeaderPath": "",
"soiHeaderPath": "/home/timon/.config/VSCodium/User/globalStorage/swissolyinfo.soicode/bundle/soiheaders/bundle/soiheader",
"flags": "-Wall -Wextra -std=c++17 -g3 -ggdb3 -fsanitize=address,undefined -D_GLIBCXX_DEBUG",
"useBundledSoiHeaders": true
}
}
{
"C_Cpp.default.configurationProvider": "swissolyinfo.soicode"
}
\ No newline at end of file
#include <soi>
signed main() {
int a = read_int();
int b = read_int();
int answer = a + b;
print(answer);
}
[sample.01]
input="""
2
3
"""
output="""
5
"""
[sample.02]
input="""
700000000000000000
300000000000000000
"""
output="""
1000000000000000000
"""
{
"workspace": {
"templateVersion": "0.8.0"
},
"settings": {
"compilerPath": "/nix/store/8madhhcxhxlf0rrc5hdsk65l206r3cc6-gcc-wrapper-9.3.0/bin/g++",
"debuggerPath": "/home/timon/.nix-profile/bin/gdb",
"cppHeaderPath": [],
"soiHeaderPath": "/home/timon/.config/VSCodium/User/globalStorage/swissolyinfo.soicode/bundle/soiheaders/bundle/soiheader",
"flags": "-Wall -Wextra -std=c++17 -g3 -ggdb3 -fsanitize=address,undefined -D_GLIBCXX_DEBUG",
"useBundledSoiHeaders": true
}
}
\ No newline at end of file
# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix)
[
{
goPackagePath = "github.com/BurntSushi/toml";
fetch = {
type = "git";
url = "https://github.com/BurntSushi/toml";
rev = "v0.3.1";
sha256 = "1fjdwwfzyzllgiwydknf1pwjvy49qxfsczqx5gz3y0izs7as99j6";
};
}
{
goPackagePath = "github.com/cenkalti/backoff";
fetch = {
type = "git";
url = "https://github.com/cenkalti/backoff";
rev = "v2.0.0";
sha256 = "0k4899ifpir6kmfxli8a2xfj5zdh0xb2jd0fq2r38wzd4pk25ipr";
};
}
{
goPackagePath = "github.com/fatih/color";
fetch = {
type = "git";
url = "https://github.com/fatih/color";
rev = "v1.7.0";
sha256 = "0v8msvg38r8d1iiq2i5r4xyfx0invhc941kjrsg5gzwvagv55inv";
};
}
{
goPackagePath = "github.com/mattn/go-colorable";
fetch = {
type = "git";
url = "https://github.com/mattn/go-colorable";
rev = "v0.1.4";
sha256 = "1yxcz08kminqr1221zxpibnbzfcgs3fafin0z9zqb3gqvf74jywz";
};
}
{
goPackagePath = "github.com/mattn/go-isatty";
fetch = {
type = "git";
url = "https://github.com/mattn/go-isatty";
rev = "v0.0.9";
sha256 = "0i3km37lajahh1y2392g4hpgvq05arcgiiv93yhzxxyv0fpqj72m";
};
}
{
goPackagePath = "github.com/ulikunitz/xz";
fetch = {
type = "git";
url = "https://github.com/ulikunitz/xz";
rev = "v0.5.4";
sha256 = "0a6l7sp67ipxim093qh6fvw8knbxj24l7bj5lykcddi5gwfi78n3";
};
}
{
goPackagePath = "golang.org/x/net";
fetch = {
type = "git";
url = "https://go.googlesource.com/net";
rev = "146acd28ed58";
sha256 = "0d177474z85nvxz8ch6y9wjqz288844wwx8q9za3x2njnk4jbgxj";
};
}
{
goPackagePath = "golang.org/x/sys";
fetch = {
type = "git";
url = "https://go.googlesource.com/sys";
rev = "fde4db37ae7a";
sha256 = "16k4w4pzziq1kln18k5fg01qgk4hpzb5xsm7175kaky6d6gwyhg3";
};
}
]
......@@ -14,8 +14,5 @@
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
},
"exclude": [
"node_modules",
".vscode-test"
]
}
\ No newline at end of file
"exclude": ["node_modules", ".vscode-test", "data"]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment