[nix] cleanup

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