Commit 72141474 authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge remote-tracking branch 'origin/701-dev-fix-nix-build' into dev

parents b2fc2d2a 5e0e4125
# Fixing the nixos image saves CI time so it doesn't have to pull new # Fixing the nixos image saves CI time so it doesn't have to pull new
#image every time (nixos/nix updates quite often). #image every time (nixos/nix updates quite often).
# image: nixos/nix:latest # image: nixos/nix:latest
image: nixos/nix:2.22.0 image: nixos/nix:2.24.8
#before_script: #before_script:
#- nix-env -iA nixpkgs.nix nixpkgs.cacert #- nix-env -iA nixpkgs.nix nixpkgs.cacert
...@@ -32,6 +32,7 @@ compile: ...@@ -32,6 +32,7 @@ compile:
- .spago/ - .spago/
script: script:
- nix --extra-experimental-features "nix-command flakes" run .#ci
- nix --extra-experimental-features "nix-command flakes" run .#compile - nix --extra-experimental-features "nix-command flakes" run .#compile
test: test:
...@@ -46,6 +47,7 @@ test: ...@@ -46,6 +47,7 @@ test:
- .spago/ - .spago/
script: script:
- nix --extra-experimental-features "nix-command flakes" run .#compile
- nix --extra-experimental-features "nix-command flakes" run .#test-ps - nix --extra-experimental-features "nix-command flakes" run .#test-ps
- nix-collect-garbage --delete-older-than 14d - nix-collect-garbage --delete-older-than 14d
...@@ -8,10 +8,11 @@ ...@@ -8,10 +8,11 @@
# nix-shell --show-trace --option build-fallback true --run 'bun install' # nix-shell --show-trace --option build-fallback true --run 'bun install'
# nix-shell --show-trace --option build-fallback true --run fix-bun # nix-shell --show-trace --option build-fallback true --run fix-bun
# nix-shell --show-trace --option build-fallback true --run build # nix-shell --show-trace --option build-fallback true --run build
#nix run .#install nix run .#install
nix run .#build nix run .#build
nix-shell --run "npm run css-default-theme" nix run .#build-css
nix-shell --run "npm run css-dark-theme" # nix-shell --run "npm run css-default-theme"
nix-shell --run "npm run css-herbie-theme" # nix-shell --run "npm run css-dark-theme"
nix-shell --run "npm run css-monotony-theme" # nix-shell --run "npm run css-herbie-theme"
nix-shell --run "npm run css-greyson-theme" # nix-shell --run "npm run css-monotony-theme"
\ No newline at end of file # nix-shell --run "npm run css-greyson-theme"
with (import <nixpkgs> {});
let
nodejs-with-packages = with nodePackages; [
bower
yarn
]; in
stdenv.mkDerivation rec {
name = "env";
env = buildEnv {
name = name;
paths = buildInputs;
};
buildInputs = [
nodejs-with-packages
yarn
yarn2nix
];
builder = builtins.toFile "builder.sh" ''
source $stdenv/setup
touch $out
'';
}
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1726560853,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -36,15 +36,16 @@ ...@@ -36,15 +36,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1701282334, "lastModified": 1717179513,
"narHash": "sha256-MxCVrXY6v4QmfTwIysjjaX0XUhqBbxTWWB4HXtDYsdk=", "narHash": "sha256-vboIEwIQojofItm2xGCdZCzW96U85l9nDW3ifMuAIdM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "057f9aecfb71c4437d2b27d3323df7f93c010b7e", "rev": "63dacb46bf939521bdc93981b4cbb7ecb58427a0",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "24.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
...@@ -58,11 +59,11 @@ ...@@ -58,11 +59,11 @@
"slimlock": "slimlock" "slimlock": "slimlock"
}, },
"locked": { "locked": {
"lastModified": 1720786645, "lastModified": 1727269424,
"narHash": "sha256-eiuWqQ9xTA2E76XDg13TQBecnLV1g+ahdauC0FYSD7U=", "narHash": "sha256-uoVjAkKbuJSA7++kyBjxLozICDdukZ+Mjj5Z/K5qMak=",
"owner": "thomashoneyman", "owner": "thomashoneyman",
"repo": "purescript-overlay", "repo": "purescript-overlay",
"rev": "c46925ec09fdf54b5bb4ba38b40e19918d3be7be", "rev": "5a28abe663758634b1e5ca7053e08af62fd3be80",
"type": "github" "type": "github"
}, },
"original": { "original": {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:NixOS/nixpkgs"; inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=24.05";
inputs.purescript-overlay = { inputs.purescript-overlay = {
url = "github:thomashoneyman/purescript-overlay"; url = "github:thomashoneyman/purescript-overlay";
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
spago-bin.spago-0_93_37 spago-bin.spago-0_93_37
#purescript #purescript
#spago-unstable #spago-unstable
esbuild
nodejs nodejs
nodePackages.npm nodePackages.npm
]; ];
...@@ -59,13 +60,37 @@ ...@@ -59,13 +60,37 @@
in in
{ {
packages = rec { packages = rec {
ci = pkgs.writeShellApplication {
name = "install";
runtimeInputs = dependencies;
text = ''
set -e
echo "Installing JS Dependencies (CI)"
# https://docs.npmjs.com/cli/v9/commands/npm-ci
npm ci
'';
};
install = pkgs.writeShellApplication {
name = "install";
runtimeInputs = dependencies;
text = ''
set -e
echo "Installing JS Dependencies"
npm install
# https://docs.npmjs.com/cli/v9/commands/npm-ci
#npm ci
#npm/bin/npm install --dev
'';
};
compile = pkgs.writeShellApplication { compile = pkgs.writeShellApplication {
name = "compile"; name = "compile";
runtimeInputs = dependencies; runtimeInputs = dependencies;
text = '' text = ''
set -e set -e
echo "Installing JS Dependencies" #echo "Installing JS Dependencies"
#npm install #npm install
# https://docs.npmjs.com/cli/v9/commands/npm-ci # https://docs.npmjs.com/cli/v9/commands/npm-ci
#npm ci #npm ci
......
{ {
"name": "Gargantext", "name": "Gargantext",
"version": "0.0.7.2.4", "version": "0.0.7.3",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "Gargantext", "name": "Gargantext",
"version": "0.0.7.2.4", "version": "0.0.7.3",
"dependencies": { "dependencies": {
"@fontsource/crete-round": "~5.0.12", "@fontsource/crete-round": "~5.0.12",
"@fontsource/montserrat": "~5.0.17", "@fontsource/montserrat": "~5.0.17",
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
"scripts": { "scripts": {
"build": "spago build", "build": "spago build",
"bundle": "spago bundle --module Main --outfile dist/bundle.min.js --minify --source-maps", "bundle": "spago bundle --module Main --outfile dist/bundle.min.js --minify --source-maps",
"css": "$npm_execpath css-themes", "css": "$npm_execpath run 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-themes": "$npm_execpath run css-default-theme && $npm_execpath run css-dark-theme && $npm_execpath run css-darkster-theme && $npm_execpath run css-greyson-theme && $npm_execpath run css-herbie-theme && $npm_execpath run css-monotony-theme",
"css-default-theme": "sass src/sass/themes/default.scss:dist/styles/bootstrap-default.css", "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-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-darkster-theme": "sass src/sass/themes/darkster.scss:dist/styles/bootstrap-darkster.css",
......
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