Remove other now obsolete nix files

This commit is contained in:
eikek 2024-03-10 15:36:40 +01:00
parent f3f246d798
commit 3aad3b7be4
8 changed files with 16 additions and 76 deletions

View File

@ -17,9 +17,5 @@ jobs:
with:
elm-version: 0.19.1
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-23.05
- name: Print nixpkgs version
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
- name: Build website (${{ env.DOCSPELL_VERSION }})
run: nix-shell website/shell.nix --run "sbt make-website"
run: nix develop .#dev-cnt --command sbt make-website

View File

@ -16,13 +16,9 @@ jobs:
with:
elm-version: 0.19.1
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-23.05
- name: Print nixpkgs version
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
- name: Build website (${{ env.DOCSPELL_VERSION }})
run: nix-shell website/shell.nix --run "sbt make-website"
run: nix develop .#dev-cnt --command sbt make-website
- name: Publish website (${{ env.DOCSPELL_VERSION }})
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sbt publish-website
run: nix develop .#dev-cnt --command sbt publish-website

View File

@ -30,6 +30,7 @@
fakeroot
zola
yarn
inotifyTools
];
docspellPkgs = pkgs.callPackage (import ./nix/pkg.nix) {};
dockerAmd64 = pkgs.pkgsCross.gnu64.callPackage (import ./nix/docker.nix) {

View File

@ -1,35 +0,0 @@
let
nixpkgs = builtins.fetchTarball {
#url = "https://github.com/NixOS/nixpkgs/archive/92e990a8d6bc35f1089c76dd8ba68b78da90da59.tar.gz";
url = "channel:nixos-23.05";
};
pkgs = import nixpkgs {};
initScript = pkgs.writeScript "docspell-build-init" ''
export LD_LIBRARY_PATH=
${pkgs.bash}/bin/bash -c "sbt -mem 4096 -java-home ${pkgs.openjdk17}/lib/openjdk"
'';
in
with pkgs;
buildFHSUserEnv {
name = "docspell-sbt";
targetPkgs = pkgs:
with pkgs; [
netcat
jdk17
wget
which
dpkg
sbt
git
elmPackages.elm
ncurses
fakeroot
mc
zola
yarn
# haskells http client needs this (to download elm packages)
iana-etc
];
runScript = initScript;
}

View File

@ -15,19 +15,20 @@ Sbt is used to build the site.
Install things by running `yarn install`.
Open terminal for each script below:
Use a dev [environment](https://docspell.org/docs/dev/development/)
and open terminal for each script below:
1. Starting the server
``` shell
nix-shell --run "cd site && zola serve"
cd site && zola serve
```
2. Building the stylesheet
``` shell
nix-shell --run ./scripts/run-styles.sh
./scripts/run-styles.sh
```
3. Building some javascript files
``` shell
nix-shell --run ./scripts/run-elm.sh
./scripts/run-elm.sh
```
Open browser at `localhost:1111`.
@ -40,7 +41,7 @@ be finally deployed. To see this, start sbt and change into the
website project.
``` shell
nix-shell website/shell.nix --run sbt
$ sbt
sbt> project website
```

View File

@ -37,7 +37,7 @@ git clone git@github.com:eikek/docspell.git "$temp"
cd "$temp" && git checkout --track origin/gh-pages && rm -rf "$temp"/*
echo "Create new website from current working directory"
cd $cdir && nix-shell website/shell.nix --run 'sbt make-website'
cd $cdir && sbt make-website
echo "Copying new site to target"
cp -R "$cdir"/website/target/zola-site/* "$temp/"

View File

@ -1,19 +0,0 @@
let
nixpkgs = builtins.fetchTarball {
url = "channel:nixos-23.05";
#url = "https://github.com/NixOS/nixpkgs/archive/e6badb26fc0d238fda2432c45b7dd4e782eb8200.tar.gz";
#url = "https://github.com/NixOs/nixpkgs/archive/0f316e4d72daed659233817ffe52bf08e081b5de.tar.gz"; #21.11
};
pkgs = import nixpkgs {};
in
with pkgs;
mkShell {
buildInputs = [
zola
yarn
sbt
elmPackages.elm
nodejs
inotifyTools
];
}

View File

@ -63,11 +63,11 @@ you can look at the results while writing.
If you want to see a live view of the page while editing, some tools
are required. The easiest way to get these is to install
[nix](https://nixos.org/) and run `nix-shell website/shell.nix` to get
an environment with all these tools installed. Otherwise install the
programs mentioned in `website/shell.nix`, which are:
[yarn](https://yarnpkg.com/), [zola](https://www.getzola.org/),
[elm](https://elm-lang.org) and [sbt](https://scala-sbt.org).
[nix](https://nixos.org/) and run `nix develop .#dev-vm` to get an
environment with all these tools installed. Otherwise install the
programs: [yarn](https://yarnpkg.com/),
[zola](https://www.getzola.org/), [elm](https://elm-lang.org) and
[sbt](https://scala-sbt.org).
Then clone the sources to your machine and build the complete site
once, so that all assets and required stuff is present: