diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2021-06-18 10:23:42 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2021-06-18 10:23:42 -0400 |
commit | fc00c1e76f2dc077486da90908c9cd0a0ca78b0e (patch) | |
tree | 759fb4097ccdbabf63f47a535663e4cb55bc1d29 /org/sisu_build.org | |
parent | ruby3, code runs (check output) (diff) |
nix: update things nix
Diffstat (limited to 'org/sisu_build.org')
-rw-r--r-- | org/sisu_build.org | 107 |
1 files changed, 33 insertions, 74 deletions
diff --git a/org/sisu_build.org b/org/sisu_build.org index c51a5c6f..31ecd908 100644 --- a/org/sisu_build.org +++ b/org/sisu_build.org @@ -2519,21 +2519,28 @@ end ** envrc #+BEGIN_SRC sh :tangle ../.envrc -if type lorri &>/dev/null; then - echo "direnv: using lorri from PATH ($(type -p lorri))" - eval "$(lorri direnv)" -else - # fall back to using direnv's builtin nix support - # to prevent bootstrapping problems. - use nix - NIX_ENFORCE_PURITY=0 -fi -# source an additional user-specific .envrc in ./.envrc-local -if [ -e .envrc-local ]; then - source .envrc-local +NIX_ENFORCE_PURITY=0 +if [ -e .envrc-local ]; then # source an additional user-specific .envrc in ./.envrc-local + source .envrc-local fi #+END_SRC +#+BEGIN_SRC sh :tangle ../.envrc-local_ +export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos +#export NIX_PATH=nixpkgs=/nixpkgs-ra/nixpkgs +## reload when these files change +use flake +watch_file flake.nix +eval "$(nix print-dev-env)" +export SisuVER=$(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g') +export SisuSRC=/grotto-ra/repo/git.repo/projects/project-sisu/sisu +export SisuDOC=/grotto-ra/repo/git.repo/projects/project-sisu/susu-markup/sisu-markup-samples/data/samples/current +export SisuOUT=/tmp/sisu/$SisuVER/www +export SisuOUTstatic=/var/www + +export RUBYLIB+=`pwd`/lib +#+END_SRC + ** shell.nix *** shell.nix TODO @@ -2542,25 +2549,7 @@ fi { pkgs ? import <nixpkgs> {} }: pkgs.mkShell { buildInputs = [ - (import ./nix/pkglst/packages.nix { inherit pkgs; }) - ]; -} -#+END_SRC - -#+BEGIN_SRC nix :NO-tangle ../shell.nix -{ pkgs ? import <nixpkgs> {} }: -let -in pkgs.mkShell { - buildInputs = with pkgs; [ - nix - bundler - bundix - <<ruby_version_2_7>> - sqlite - unzip - xz - zip - #texlive-combined-full + (import ./packages.nix { inherit pkgs; }) ]; } #+END_SRC @@ -2568,7 +2557,7 @@ in pkgs.mkShell { *** packages.nix **** default -#+BEGIN_SRC nix :tangle ../nix/pkglst/packages.nix +#+BEGIN_SRC nix :tangle ../packages.nix { pkgs ? import <nixpkgs> {} }: with pkgs; [ <<packages_nix>> @@ -2588,24 +2577,13 @@ with pkgs; [ ] #+END_SRC -**** ruby 2.7 - -#+BEGIN_SRC nix :tangle ../nix/pkglst/packages_ruby_2_7.nix -{ pkgs ? import <nixpkgs> {} }: -with pkgs; [ - <<packages_nix>> - <<ruby_version_2_7>> - <<packages_project_relevant>> -] -#+END_SRC - **** ruby 2.6 #+BEGIN_SRC nix :tangle ../nix/pkglst/packages_ruby_2_6.nix { pkgs ? import <nixpkgs> {} }: with pkgs; [ <<packages_nix>> - <<ruby_current>> + <<ruby_version_2_6>> <<packages_project_relevant>> ] #+END_SRC @@ -2620,7 +2598,7 @@ with pkgs; [ #+NAME: ruby_current #+BEGIN_SRC nix -<<ruby_version_2_7>> +<<ruby_version_3_0>> #+END_SRC *** ruby next @@ -2630,34 +2608,14 @@ with pkgs; [ <<ruby_version_3_0>> #+END_SRC -*** ruby 2.5 - ruby_version_2_5 - -#+NAME: ruby_version_2_5 -#+BEGIN_SRC nix -ruby_2_5 -rubyPackages_2_5.rake -rubyPackages_2_5.sqlite3 -rubyPackages_2_5.thor -#+END_SRC - *** ruby 2.6 - ruby_version_2_6 #+NAME: ruby_version_2_6 #+BEGIN_SRC nix -ruby -rubyPackages.rake -rubyPackages.sqlite3 -rubyPackages.thor -#+END_SRC - -*** ruby 2.7 - ruby_version_2_7 - -#+NAME: ruby_version_2_7 -#+BEGIN_SRC nix -ruby_2_7 -rubyPackages_2_7.rake -rubyPackages_2_7.sqlite3 -rubyPackages_2_7.thor +ruby_2_6 +rubyPackages_2_6.rake +rubyPackages_2_6.sqlite3 +rubyPackages_2_6.thor #+END_SRC *** ruby 3.0 - ruby_version_3_0 @@ -2683,11 +2641,12 @@ bundix #+NAME: packages_project_relevant #+BEGIN_SRC nix - sqlite - unzip - xz - zip - #texlive-combined-full +sqlite +unzip +xz +zip +openssl +#texlive-combined-full #+END_SRC * descriptions |