diff options
-rw-r--r-- | nix/pkglst/packages_ruby_2_6.nix | 5 | ||||
-rw-r--r-- | nix/pkglst/packages_ruby_3_0.nix | 5 | ||||
-rw-r--r-- | org/sisu_build.org | 38 | ||||
-rw-r--r-- | packages.nix | 14 | ||||
-rwxr-xr-x[-rw-r--r--] | shell.nix | 27 |
5 files changed, 65 insertions, 24 deletions
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 <nixpkgs> {} }: 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 <nixpkgs> {} }: 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 <nixpkgs> {} }: +pkgs.mkShell { + buildInputs = [( + with pkgs; [ + <<ruby_current>> + <<packages_project_relevant>> + <<packages_build>> + ] + )]; + shellHook = '' + if [[ -e ".envrc" ]]; then + source .envrc + fi + ''; +} +#+END_SRC + +#+BEGIN_SRC nix :NO-tangle ../shell.nix { pkgs ? import <nixpkgs> {} }: 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 <nixpkgs> {} }: with pkgs; [ - <<packages_nix>> <<ruby_current>> <<packages_project_relevant>> + <<packages_build>> ] #+END_SRC @@ -2571,9 +2589,9 @@ with pkgs; [ #+BEGIN_SRC nix :tangle ../nix/pkglst/packages_ruby_3_0.nix { pkgs ? import <nixpkgs> {} }: with pkgs; [ - <<packages_nix>> <<ruby_version_3_0>> <<packages_project_relevant>> + <<packages_build>> ] #+END_SRC @@ -2582,9 +2600,9 @@ with pkgs; [ #+BEGIN_SRC nix :tangle ../nix/pkglst/packages_ruby_2_6.nix { pkgs ? import <nixpkgs> {} }: with pkgs; [ - <<packages_nix>> <<ruby_version_2_6>> <<packages_project_relevant>> + <<packages_build>> ] #+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 <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 -] diff --git a/shell.nix b/shell.nix index 34300f62..5c0baa18 100644..100755 --- a/shell.nix +++ b/shell.nix @@ -1,6 +1,27 @@ +#!/usr/bin/env -S nix-shell --pure { pkgs ? import <nixpkgs> {} }: 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 + ''; } |