From 39e7b730e12928cffd5996e6eda138fe5ae2cbf0 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 18 Jun 2021 10:26:06 -0400 Subject: nix: adjust, packages in shell.nix --- nix/pkglst/packages_ruby_2_6.nix | 5 ++++- nix/pkglst/packages_ruby_3_0.nix | 5 ++++- org/sisu_build.org | 38 +++++++++++++++++++++++++++++++++----- packages.nix | 14 -------------- shell.nix | 27 ++++++++++++++++++++++++--- 5 files changed, 65 insertions(+), 24 deletions(-) delete mode 100644 packages.nix mode change 100644 => 100755 shell.nix diff --git a/nix/pkglst/packages_ruby_2_6.nix b/nix/pkglst/packages_ruby_2_6.nix index 1d888388..f8f27323 100644 --- a/nix/pkglst/packages_ruby_2_6.nix +++ b/nix/pkglst/packages_ruby_2_6.nix @@ -1,6 +1,5 @@ { pkgs ? import {} }: with pkgs; [ - ruby_2_6 rubyPackages_2_6.rake rubyPackages_2_6.sqlite3 @@ -11,4 +10,8 @@ with pkgs; [ zip openssl #texlive-combined-full + nixFlakes + validatePkgConfig + jq + git ] diff --git a/nix/pkglst/packages_ruby_3_0.nix b/nix/pkglst/packages_ruby_3_0.nix index e943f7fe..66c9e0ba 100644 --- a/nix/pkglst/packages_ruby_3_0.nix +++ b/nix/pkglst/packages_ruby_3_0.nix @@ -1,6 +1,5 @@ { pkgs ? import {} }: with pkgs; [ - ruby_3_0 rubyPackages_3_0.rake rubyPackages_3_0.sqlite3 @@ -11,4 +10,8 @@ with pkgs; [ zip openssl #texlive-combined-full + nixFlakes + validatePkgConfig + jq + git ] diff --git a/org/sisu_build.org b/org/sisu_build.org index 31ecd908..cf1a7429 100644 --- a/org/sisu_build.org +++ b/org/sisu_build.org @@ -2545,7 +2545,25 @@ export RUBYLIB+=`pwd`/lib *** shell.nix TODO -#+BEGIN_SRC nix :tangle ../shell.nix +#+BEGIN_SRC nix :tangle ../shell.nix :tangle-mode (identity #o755) :shebang #!/usr/bin/env -S nix-shell --pure +{ pkgs ? import {} }: +pkgs.mkShell { + buildInputs = [( + with pkgs; [ + <> + <> + <> + ] + )]; + shellHook = '' + if [[ -e ".envrc" ]]; then + source .envrc + fi + ''; +} +#+END_SRC + +#+BEGIN_SRC nix :NO-tangle ../shell.nix { pkgs ? import {} }: pkgs.mkShell { buildInputs = [ @@ -2557,12 +2575,12 @@ pkgs.mkShell { *** packages.nix **** default -#+BEGIN_SRC nix :tangle ../packages.nix +#+BEGIN_SRC nix :NO-tangle ../packages.nix { pkgs ? import {} }: with pkgs; [ - <> <> <> + <> ] #+END_SRC @@ -2571,9 +2589,9 @@ with pkgs; [ #+BEGIN_SRC nix :tangle ../nix/pkglst/packages_ruby_3_0.nix { pkgs ? import {} }: with pkgs; [ - <> <> <> + <> ] #+END_SRC @@ -2582,9 +2600,9 @@ with pkgs; [ #+BEGIN_SRC nix :tangle ../nix/pkglst/packages_ruby_2_6.nix { pkgs ? import {} }: with pkgs; [ - <> <> <> + <> ] #+END_SRC @@ -2649,6 +2667,16 @@ openssl #texlive-combined-full #+END_SRC +*** project misc build packages + +#+NAME: packages_build +#+BEGIN_SRC nix +nixFlakes +validatePkgConfig +jq +git +#+END_SRC + * descriptions ** README diff --git a/packages.nix b/packages.nix deleted file mode 100644 index e943f7fe..00000000 --- a/packages.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ 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 old mode 100644 new mode 100755 index 34300f62..5c0baa18 --- a/shell.nix +++ b/shell.nix @@ -1,6 +1,27 @@ +#!/usr/bin/env -S nix-shell --pure { pkgs ? import {} }: pkgs.mkShell { - buildInputs = [ - (import ./packages.nix { inherit pkgs; }) - ]; + buildInputs = [( + 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 + nixFlakes + validatePkgConfig + jq + git + ] + )]; + shellHook = '' + if [[ -e ".envrc" ]]; then + source .envrc + fi + ''; } -- cgit v1.2.3