From fc00c1e76f2dc077486da90908c9cd0a0ca78b0e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 18 Jun 2021 10:23:42 -0400 Subject: nix: update things nix --- .envrc | 15 ++---- nix/pkglst/packages.nix | 13 ----- nix/pkglst/packages_ruby_2_6.nix | 19 +++---- nix/pkglst/packages_ruby_2_7.nix | 13 ----- nix/pkglst/packages_ruby_3_0.nix | 11 ++-- org/sisu_build.org | 107 ++++++++++++--------------------------- packages.nix | 14 +++++ shell.nix | 2 +- 8 files changed, 67 insertions(+), 127 deletions(-) delete mode 100644 nix/pkglst/packages.nix delete mode 100644 nix/pkglst/packages_ruby_2_7.nix create mode 100644 packages.nix diff --git a/.envrc b/.envrc index dd2752c9..6bb4547e 100644 --- a/.envrc +++ b/.envrc @@ -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 {} }: -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 {} }: 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 {} }: -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 {} }: pkgs.mkShell { buildInputs = [ - (import ./nix/pkglst/packages.nix { inherit pkgs; }) - ]; -} -#+END_SRC - -#+BEGIN_SRC nix :NO-tangle ../shell.nix -{ pkgs ? import {} }: -let -in pkgs.mkShell { - buildInputs = with pkgs; [ - nix - bundler - bundix - <> - 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 {} }: with pkgs; [ <> @@ -2588,24 +2577,13 @@ with pkgs; [ ] #+END_SRC -**** ruby 2.7 - -#+BEGIN_SRC nix :tangle ../nix/pkglst/packages_ruby_2_7.nix -{ pkgs ? import {} }: -with pkgs; [ - <> - <> - <> -] -#+END_SRC - **** ruby 2.6 #+BEGIN_SRC nix :tangle ../nix/pkglst/packages_ruby_2_6.nix { pkgs ? import {} }: with pkgs; [ <> - <> + <> <> ] #+END_SRC @@ -2620,7 +2598,7 @@ with pkgs; [ #+NAME: ruby_current #+BEGIN_SRC nix -<> +<> #+END_SRC *** ruby next @@ -2630,34 +2608,14 @@ with pkgs; [ <> #+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 {} }: +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 +] diff --git a/shell.nix b/shell.nix index 80173752..34300f62 100644 --- a/shell.nix +++ b/shell.nix @@ -1,6 +1,6 @@ { pkgs ? import {} }: pkgs.mkShell { buildInputs = [ - (import ./nix/pkglst/packages.nix { inherit pkgs; }) + (import ./packages.nix { inherit pkgs; }) ]; } -- cgit v1.2.3