[nix] cleanup

parent 9488e648
Pipeline #5953 canceled with stage
......@@ -101,6 +101,6 @@ nix-shell --run build
To compile CSS (Sass):
```shell
nix-shell --run "yarn css"
nix-shell --run "bun css"
```
import (
builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/23.05.tar.gz";
url = "https://github.com/NixOS/nixpkgs/archive/23.11.tar.gz";
}
)
{
"name": "Gargantext",
"version": "0.0.6.9.9.9.9.1",
"scripts": {
"css": "bun css-themes",
"css-themes": "bun css-default-theme && bun css-dark-theme && bun css-darkster-theme && bun css-greyson-theme && bun css-herbie-theme && bun css-monotony-theme",
"css-default-theme": "sass src/sass/themes/default.scss:dist/styles/bootstrap-default.css",
"css-dark-theme": "cp node_modules/bootstrap-dark/src/bootstrap-dark.css dist/styles/bootstrap-dark.css",
"css-darkster-theme": "sass src/sass/themes/darkster.scss:dist/styles/bootstrap-darkster.css",
"css-greyson-theme": "sass src/sass/themes/greyson.scss:dist/styles/bootstrap-greyson.css",
"css-herbie-theme": "sass src/sass/themes/herbie.scss:dist/styles/bootstrap-herbie.css",
"css-monotony-theme": "sass src/sass/themes/monotony.scss:dist/styles/bootstrap-monotony.css",
"docs": "bun spago docs",
"server": "serve -l 8008 dist",
"server-ssl": "ssl-serve --ssl dist"
},
"dependencies": {
"@fontsource/crete-round": "~5.0.12",
"@fontsource/montserrat": "~5.0.17",
"@fontsource/mulish": "^5.0.16",
"@fontsource/nunito": "^5.0.17",
"@fontsource/open-sans": "~5.0.25",
"@fontsource/oswald": "~5.0.18",
"@popperjs/core": "~2.9.2",
"@urql/core": "~2.3.3",
"aes-js": "~3.1.1",
"base-x": "~3.0.2",
"bootstrap": "~4.6.0",
"bootstrap-dark": "~1.0.3",
"buffer": "~6.0.3",
"create-react-class": "~15.6.3",
"crypto": "~1.0.1",
"d3": "~7.6.1",
"echarts": "~5.1.2",
"echarts-for-react": "~3.0.1",
"graphology": "~0.25.1",
"graphology-communities-louvain": "~2.0.1",
"graphology-layout-forceatlas2": "~0.9.2",
"graphology-layout-noverlap": "~0.4.2",
"graphology-operators": "~1.6.0",
"graphql": "~15.6.1",
"graphql-ws": "~5.5.0",
"highlightjs": "~9.16.2",
"immer": "~9.0.5",
"isomorphic-unfetch": "~3.1.0",
"markdown-it": "~13.0.1",
"prop-types": "~15.6.2",
"pullstate": "~1.20.6",
"react-awesome-popover": "~6.1.1",
"react-bootstrap": "~1.5.2",
"react-dom": "~17.0.2",
"react-tooltip": "~4.2.8",
"secp256k1": "~4.0.2",
"sigma": "~2.4.0",
"twgl.js": "~5.0.4",
"uuid": "8.3.2"
},
"devDependencies": {
"@babel/core": "^7.15.0",
"@babel/preset-env": "^7.15.6",
"@babel/preset-react": "^7.12.7",
"@getgauge/cli": "^1.4.0",
"esbuild": "^0.15.7",
"parcel": "^2.8.2",
"react-testing-library": "^8.0.1",
"sass": "^1.35.2",
"serve": "^12.0.0",
"spago": "^0.93.29",
"ssl-serve": "^6.5.8",
"taiko": "latest",
"vscode-languageserver": "^7.0.0",
"xhr2": "^0.2.1"
},
"optionalDependencies": {
"purescript-language-server": "^0.17.1"
}
"name": "Gargantext",
"version": "0.0.6.9.9.9.9.1",
"scripts": {
"build": "spago build",
"bundle": "spago bundle --module Main --outfile dist/bundle.js",
"css": "$npm_execpath css-themes",
"css-themes": "$npm_execpath css-default-theme && $npm_execpath css-dark-theme && $npm_execpath css-darkster-theme && $npm_execpath css-greyson-theme && $npm_execpath css-herbie-theme && $npm_execpath css-monotony-theme",
"css-default-theme": "sass src/sass/themes/default.scss:dist/styles/bootstrap-default.css",
"css-dark-theme": "cp node_modules/bootstrap-dark/src/bootstrap-dark.css dist/styles/bootstrap-dark.css",
"css-darkster-theme": "sass src/sass/themes/darkster.scss:dist/styles/bootstrap-darkster.css",
"css-greyson-theme": "sass src/sass/themes/greyson.scss:dist/styles/bootstrap-greyson.css",
"css-herbie-theme": "sass src/sass/themes/herbie.scss:dist/styles/bootstrap-herbie.css",
"css-monotony-theme": "sass src/sass/themes/monotony.scss:dist/styles/bootstrap-monotony.css",
"docs": "spago docs",
"minify": "spago bundle --module Main --outfile dist/bundle.min.js --minify",
"repl": "spago repl",
"server": "serve -l 8008 dist",
"server-ssl": "ssl-serve --ssl dist",
"test": "spago test"
},
"dependencies": {
"@fontsource/crete-round": "~5.0.12",
"@fontsource/montserrat": "~5.0.17",
"@fontsource/mulish": "^5.0.16",
"@fontsource/nunito": "^5.0.17",
"@fontsource/open-sans": "~5.0.25",
"@fontsource/oswald": "~5.0.18",
"@popperjs/core": "~2.9.2",
"@urql/core": "~2.3.3",
"aes-js": "~3.1.1",
"base-x": "~3.0.2",
"bootstrap": "~4.6.0",
"bootstrap-dark": "~1.0.3",
"buffer": "~6.0.3",
"create-react-class": "~15.6.3",
"crypto": "~1.0.1",
"d3": "~7.6.1",
"echarts": "~5.1.2",
"echarts-for-react": "~3.0.1",
"graphology": "~0.25.1",
"graphology-communities-louvain": "~2.0.1",
"graphology-layout-forceatlas2": "~0.9.2",
"graphology-layout-noverlap": "~0.4.2",
"graphology-operators": "~1.6.0",
"graphql": "~15.6.1",
"graphql-ws": "~5.5.0",
"highlightjs": "~9.16.2",
"immer": "~9.0.5",
"isomorphic-unfetch": "~3.1.0",
"markdown-it": "~13.0.1",
"prop-types": "~15.6.2",
"pullstate": "~1.20.6",
"react-awesome-popover": "~6.1.1",
"react-bootstrap": "~1.5.2",
"react-dom": "~17.0.2",
"react-tooltip": "~4.2.8",
"secp256k1": "~4.0.2",
"sigma": "~2.4.0",
"twgl.js": "~5.0.4",
"uuid": "8.3.2"
},
"devDependencies": {
"@babel/core": "~7.15.0",
"@babel/preset-env": "~7.15.6",
"@babel/preset-react": "~7.12.7",
"@getgauge/cli": "~1.4.0",
"esbuild": "~0.15.7",
"parcel": "~2.8.2",
"react-testing-library": "~8.0.1",
"sass": "~1.35.2",
"serve": "~12.0.0",
"spago": "~0.93.29",
"ssl-serve": "~6.5.8",
"taiko": "latest",
"vscode-languageserver": "~7.0.0",
"xhr2": "~0.2.1"
},
"optionalDependencies": {
"purescript-language-server": "~0.17.1"
}
}
......@@ -2,16 +2,7 @@
let
easy-ps = import ./nix/easy-ps.nix { inherit pkgs; };
purs-packages = import ./purs-packages.nix { inherit pkgs; };
purs-project = import ./nix/purs-project.nix { inherit pkgs; };
build-purs = pkgs.writeShellScriptBin "build-purs" ''
#!/usr/bin/env bash
purs compile ${toString purs-project.sourceGlobs} "src/**/*.purs" "test/**/*.purs"
'';
build = pkgs.writeShellScriptBin "build" ''
compile = pkgs.writeShellScriptBin "compile" ''
#!/usr/bin/env bash
set -e
......@@ -20,35 +11,30 @@ let
bun install
echo "Compiling"
#build-purs
#spago build
#echo "Bundling"
#pulp browserify --skip-compile -t dist/bundle.js --src-path output
#browserify
bun run build
'';
build = pkgs.writeShellScriptBin "build" ''
#!/usr/bin/env bash
set -e
compile
# 0.15
bun spago bundle --module Main --outfile dist/bundle.js
echo "Bundling"
bun run bundle
'';
build-suggestions = pkgs.writeShellScriptBin "build-suggestions" ''
#!/usr/bin/env bash
set -e
echo "Installing JS Dependencies"
#yarn
bun install
rm -rf ./output
echo "Compiling"
bun spago build
#build-purs
#spago build
#echo "Bundling"
#pulp browserify --skip-compile -t dist/bundle.js --src-path output
#browserify
compile
# 0.15
echo "Bundling"
bun spago bundle --module Main --outfile dist/bundle.js --purs-args "--json-errors" | jq -r '.warnings | map(select(.errorCode | test("UnusedDctorExplicitImport|UnusedDctorImport|UnusedDeclaration|UnusedExplicitImport|UnusedImport|UnusedName|UnusedTypeVar"))) | map(select(.filename | test("^.spago") | not)) | map("[\(.filename)::\(.position.startLine)] \(.message)\n \(.suggestion)") | join("\n----------\n")'
'';
......@@ -58,8 +44,7 @@ let
set -e
#yarn css
bun css
bun run css
'';
serve = pkgs.writeShellScriptBin "serve" ''
......@@ -67,7 +52,7 @@ let
set -e
#yarn server
bun server
bun run server
'';
......@@ -92,29 +77,23 @@ let
#!/usr/bin/env bash
set -e
minify dist/bundle.js > dist/bundle.min.js
bun run minify
'';
repl = pkgs.writeShellScriptBin "repl" ''
#!/usr/bin/env bash
bun spago repl
bun run repl
'';
test-ps = pkgs.writeShellScriptBin "test-ps" ''
#!/usr/bin/env bash
set -e
echo "Compiling"
bun install
#spago build
#build-purs
compile
echo "Testing"
bun spago test
# spago -x test.dhall bundle-app --main Test.Main --to dist/test-bundle.js --platform node
# pulp browserify --skip-compile -t dist/bundle.js --src-path output
# pulp test --src-path output --test-path output
#NODE_PATH=output node -e "require('Test.Main').main();"
bun run test
'';
# TODO: Remove this when nixpkgs is updated to newer version (23.05
......@@ -124,40 +103,32 @@ in
pkgs.mkShell {
buildInputs = [
easy-ps.purs-0_15_15
easy-ps.spago
easy-ps.psc-package
easy-ps.dhall-json-simple
easy-ps.zephyr
pkgs.ijq
pkgs.jq
#pkgs.closurecompiler
pkgs.esbuild
pkgs.minify
pkgs.nodejs
#pkgs.nodePackages.purescript-language-server
#pkgs.python # needed for msgpack etc
#nodejs_20_3_1
#pkgs.pulp
#pkgs.spago
#pkgs.yarn
pkgs.bun
pkgs.sqlite
# scripts
build-css
build-purs
build-suggestions
build-watch
build-zephyr
build
compile
minify-bundle
repl
serve
test-ps
];
shellHook = ''
export PURS_IDE_SOURCES='${toString purs-project.unquotedSourceGlobs}'
'';
#shellHook = ''
# export PURS_IDE_SOURCES='${toString purs-project.unquotedSourceGlobs}'
#'';
}
## how to build the project with nix dependencies:
......
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