aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2021-06-18 10:26:06 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2021-06-18 10:26:06 -0400
commit39e7b730e12928cffd5996e6eda138fe5ae2cbf0 (patch)
treee0ecd7702ea3a00cf2bee7fbb478d94930296452
parentnix: update things nix (diff)
nix: adjust, packages in shell.nixHEADupstream
-rw-r--r--nix/pkglst/packages_ruby_2_6.nix5
-rw-r--r--nix/pkglst/packages_ruby_3_0.nix5
-rw-r--r--org/sisu_build.org38
-rw-r--r--packages.nix14
-rwxr-xr-x[-rw-r--r--]shell.nix27
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
+ '';
}