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 | |
| parent | ruby3, code runs (check output) (diff) | |
nix: update things nix
| -rw-r--r-- | .envrc | 15 | ||||
| -rw-r--r-- | nix/pkglst/packages.nix | 13 | ||||
| -rw-r--r-- | nix/pkglst/packages_ruby_2_6.nix | 19 | ||||
| -rw-r--r-- | nix/pkglst/packages_ruby_2_7.nix | 13 | ||||
| -rw-r--r-- | nix/pkglst/packages_ruby_3_0.nix | 11 | ||||
| -rw-r--r-- | org/sisu_build.org | 107 | ||||
| -rw-r--r-- | packages.nix | 14 | ||||
| -rw-r--r-- | shell.nix | 2 | 
8 files changed, 67 insertions, 127 deletions
| @@ -1,13 +1,4 @@ -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 diff --git a/nix/pkglst/packages.nix b/nix/pkglst/packages.nix deleted file mode 100644 index 1c623afc..00000000 --- a/nix/pkglst/packages.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ pkgs ? import <nixpkgs> {} }: -with pkgs; [ - -  ruby_2_7 -  rubyPackages_2_7.rake -  rubyPackages_2_7.sqlite3 -  rubyPackages_2_7.thor -    sqlite -    unzip -    xz -    zip -    #texlive-combined-full -] diff --git a/nix/pkglst/packages_ruby_2_6.nix b/nix/pkglst/packages_ruby_2_6.nix index 1c623afc..1d888388 100644 --- a/nix/pkglst/packages_ruby_2_6.nix +++ b/nix/pkglst/packages_ruby_2_6.nix @@ -1,13 +1,14 @@  { pkgs ? import <nixpkgs> {} }:  with pkgs; [ -  ruby_2_7 -  rubyPackages_2_7.rake -  rubyPackages_2_7.sqlite3 -  rubyPackages_2_7.thor -    sqlite -    unzip -    xz -    zip -    #texlive-combined-full +  ruby_2_6 +  rubyPackages_2_6.rake +  rubyPackages_2_6.sqlite3 +  rubyPackages_2_6.thor +  sqlite +  unzip +  xz +  zip +  openssl +  #texlive-combined-full  ] diff --git a/nix/pkglst/packages_ruby_2_7.nix b/nix/pkglst/packages_ruby_2_7.nix deleted file mode 100644 index 1c623afc..00000000 --- a/nix/pkglst/packages_ruby_2_7.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ pkgs ? import <nixpkgs> {} }: -with pkgs; [ - -  ruby_2_7 -  rubyPackages_2_7.rake -  rubyPackages_2_7.sqlite3 -  rubyPackages_2_7.thor -    sqlite -    unzip -    xz -    zip -    #texlive-combined-full -] diff --git a/nix/pkglst/packages_ruby_3_0.nix b/nix/pkglst/packages_ruby_3_0.nix index 5ac59203..e943f7fe 100644 --- a/nix/pkglst/packages_ruby_3_0.nix +++ b/nix/pkglst/packages_ruby_3_0.nix @@ -5,9 +5,10 @@ with pkgs; [    rubyPackages_3_0.rake    rubyPackages_3_0.sqlite3    rubyPackages_3_0.thor -    sqlite -    unzip -    xz -    zip -    #texlive-combined-full +  sqlite +  unzip +  xz +  zip +  openssl +  #texlive-combined-full  ] 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 diff --git a/packages.nix b/packages.nix new file mode 100644 index 00000000..e943f7fe --- /dev/null +++ b/packages.nix @@ -0,0 +1,14 @@ +{ pkgs ? import <nixpkgs> {} }: +with pkgs; [ + +  ruby_3_0 +  rubyPackages_3_0.rake +  rubyPackages_3_0.sqlite3 +  rubyPackages_3_0.thor +  sqlite +  unzip +  xz +  zip +  openssl +  #texlive-combined-full +] @@ -1,6 +1,6 @@  { pkgs ? import <nixpkgs> {} }:  pkgs.mkShell {    buildInputs = [ -    (import ./nix/pkglst/packages.nix { inherit pkgs; }) +    (import ./packages.nix { inherit pkgs; })    ];  } | 
