aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.envrc-nix6
-rw-r--r--flake.nix6
-rw-r--r--org/config_env.org6
-rw-r--r--org/config_nix.org102
-rw-r--r--org/sisu_version_info_and_doc_header_including_copyright_and_license.org2
-rwxr-xr-xshell.nix2
6 files changed, 55 insertions, 69 deletions
diff --git a/.envrc-nix b/.envrc-nix
index d28ef935..f827dffa 100644
--- a/.envrc-nix
+++ b/.envrc-nix
@@ -22,12 +22,12 @@ echo "
• for a dev shell (development environment):
❯❯ nix develop
- ❯❯ nix develop ".#" --print-build-logs -c zsh
- ❯❯ nix develop ".#dsh-latex-pdf" --print-build-logs -c zsh
+ ❯❯ nix develop '.#' --print-build-logs -c zsh
+ ❯❯ nix develop '.#dsh-latex-pdf' --print-build-logs -c zsh
• to build project:
- ❯❯ nix build ".#" --print-build-logs
+ ❯❯ nix build '.#' --print-build-logs
- (see nix other/additional build options):
❯❯ nix flake show
"
diff --git a/flake.nix b/flake.nix
index b5588879..a7dbf157 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,6 +1,6 @@
{
description = "sisu parser & document generator";
- inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; # "github:nixos/nixpkgs"; # "github:NixOS/nixpkgs/nixpkgs-unstable"; "nixpkgs/nixos-unstable"; "nixpkgs/nixos-21.11";
+ inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = {
self,
nixpkgs,
@@ -201,7 +201,7 @@
];
inherit shellHook;
};
- #default = import ./shell.nix {inherit pkgs;};
- });
+ #default = import ./shell.nix { inherit pkgs; };
+ });
};
}
diff --git a/org/config_env.org b/org/config_env.org
index 671b0a1c..83dcd2eb 100644
--- a/org/config_env.org
+++ b/org/config_env.org
@@ -83,12 +83,12 @@ echo "
• for a dev shell (development environment):
❯❯ nix develop
- ❯❯ nix develop ".#" --print-build-logs -c zsh
- ❯❯ nix develop ".#dsh-latex-pdf" --print-build-logs -c zsh
+ ❯❯ nix develop '.#' --print-build-logs -c zsh
+ ❯❯ nix develop '.#dsh-latex-pdf' --print-build-logs -c zsh
• to build project:
- ❯❯ nix build ".#" --print-build-logs
+ ❯❯ nix build '.#' --print-build-logs
- (see nix other/additional build options):
❯❯ nix flake show
"
diff --git a/org/config_nix.org b/org/config_nix.org
index 9b922882..33014ad3 100644
--- a/org/config_nix.org
+++ b/org/config_nix.org
@@ -1,6 +1,6 @@
-*- mode: org -*-
#+TITLE: configuration nix
-#+DESCRIPTION: makefile for spine
+#+DESCRIPTION: configuration nix
#+FILETAGS: :sisu:build:tools:
#+AUTHOR: Ralph Amissah
#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]]
@@ -15,26 +15,15 @@
#+PROPERTY: header-args+ :mkdirp yes
#+OPTIONS: H:3 num:nil toc:t \n:t ::t |:t ^:nil -:t f:t *:t
-* nix :nix:
-
-#+NAME: nixpkgs_local
-#+BEGIN_SRC sh
-/srv/nix/nixpkgs
-#+END_SRC
-
* sisu
-
-- default.nix
-- shell.nix
-
-** flake.nix
+** flake.nix :flake:
#+HEADER: :tangle ../flake.nix
#+HEADER: :noweb yes
#+BEGIN_SRC nix
{
description = "sisu parser & document generator";
- inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; # "github:nixos/nixpkgs"; # "github:NixOS/nixpkgs/nixpkgs-unstable"; "nixpkgs/nixos-unstable"; "nixpkgs/nixos-21.11";
+ inputs.nixpkgs.url = "<<nixpkgs_url>>";
outputs = {
self,
nixpkgs,
@@ -217,19 +206,20 @@
];
inherit shellHook;
};
- #default = import ./shell.nix {inherit pkgs;};
- });
+ #default = import ./shell.nix { inherit pkgs; };
+ });
};
}
#+END_SRC
-** shell.nix TODO
+** shell.nix :shell:
+*** tangle
#+HEADER: :tangle ../shell.nix
-#+HEADER: :shebang "#!/usr/bin/env -S nix-shell --impure\n#!nix-shell -i bash"
#+HEADER: :tangle-mode (identity #o755)
+#+HEADER: :shebang "#!/usr/bin/env -S nix-shell --impure\n#!nix-shell -i bash"
#+BEGIN_SRC nix
-{pkgs ? import <nixpkgs> {}}:
+{ pkgs ? import <nixpkgs> {} }:
with pkgs;
mkShell {
buildInputs = [
@@ -242,33 +232,18 @@ with pkgs;
'';
}
#+END_SRC
-{ pkgs ? import <nixpkgs> {} }:
-with pkgs;
-mkShell {
- buildInputs = [
- <<ruby_current>>
- sqlite
- graphicsmagick
- unzip
- xz
- zip
- openssl
- #texliveFull # texliveTeTeX
- nixFlakes
- validatePkgConfig
- nix-output-monitor
- nix-tree
- jq
- git
- #starship
- ];
- shellHook = ''
- '';
-}
+
+** shared parts
+*** nixpkgs url
+
+#+NAME: nixpkgs_url
+#+BEGIN_SRC nix
+github:NixOS/nixpkgs/nixpkgs-unstable
#+END_SRC
-** packages.nix
-*** ruby next
+*** ruby versions
+**** ruby package selection
+***** ruby next
#+NAME: ruby_next
#+BEGIN_SRC nix
@@ -278,7 +253,7 @@ rubyPackages<<ruby_version_next>>.sqlite3
rubyPackages<<ruby_version_next>>.thor
#+END_SRC
-*** ruby current
+***** ruby current
#+NAME: ruby_current
#+BEGIN_SRC nix
@@ -288,22 +263,25 @@ rubyPackages<<ruby_version_current>>.sqlite3
rubyPackages<<ruby_version_current>>.thor
#+END_SRC
-*** ruby legacy
+***** ruby legacy
#+NAME: ruby_legacy
#+BEGIN_SRC nix
-<<ruby_version_3_2>>
+ruby<<ruby_version_legacy>>
+rubyPackages<<ruby_version_legacy>>.rake
+rubyPackages<<ruby_version_legacy>>.sqlite3
+rubyPackages<<ruby_version_legacy>>.thor
#+END_SRC
-*** ruby versions current, next
-**** ruby version next
+**** SET ruby nix package versions (current, next)
+***** SET ruby version next
#+NAME: ruby_version_next
#+BEGIN_SRC nix
_3_4
#+END_SRC
-**** ruby version current
+***** SET ruby version current
- default to current nix version, which is ruby 3.3 but not provided as a fixed lable/tag, so leave blank and will
follow nix current nix
@@ -312,15 +290,15 @@ _3_4
#+BEGIN_SRC nix
#+END_SRC
-**** ruby version legacy
+***** SET ruby version legacy
#+NAME: ruby_version_legacy
#+BEGIN_SRC nix
_3_2
#+END_SRC
-*** ruby fixed versions
-**** ruby 3.4 - ruby_version_3_4
+**** ruby fixed versions
+***** ruby 3.4 - ruby_version_3_4
#+NAME: ruby_version_3_4
#+BEGIN_SRC nix
@@ -330,7 +308,7 @@ rubyPackages_3_4.sqlite3
rubyPackages_3_4.thor
#+END_SRC
-**** ruby 3.2 - ruby_version_3_2
+***** ruby 3.2 - ruby_version_3_2
#+NAME: ruby_version_3_2
#+BEGIN_SRC nix
@@ -340,7 +318,8 @@ rubyPackages_3_2.sqlite3
rubyPackages_3_2.thor
#+END_SRC
-*** nix related packages
+*** packages.nix
+**** nix related packages
#+NAME: nix_packages
#+BEGIN_SRC nix
@@ -349,7 +328,7 @@ bundler
bundix
#+END_SRC
-*** project relevant packages
+**** project relevant packages
#+NAME: packages_project_relevant
#+BEGIN_SRC nix
@@ -362,7 +341,7 @@ openssl
#texliveFull # texliveTeTeX
#+END_SRC
-*** project misc build packages
+**** project misc build packages
#+NAME: packages_build
#+BEGIN_SRC nix
@@ -379,9 +358,16 @@ git
#starship
#+END_SRC
-** sisu version SET VERSION :version:set:project:
+*** sisu version SET VERSION :version:set:project:
#+NAME: sisu_project_version
#+BEGIN_SRC emacs-lisp
<<./sisu_version_info_and_doc_header_including_copyright_and_license.org:sisu_project_version()>>
#+END_SRC
+
+* nix :nix:
+
+#+NAME: nixpkgs_local
+#+BEGIN_SRC sh
+/srv/nix/nixpkgs
+#+END_SRC
diff --git a/org/sisu_version_info_and_doc_header_including_copyright_and_license.org b/org/sisu_version_info_and_doc_header_including_copyright_and_license.org
index 6581f5e2..43372a21 100644
--- a/org/sisu_version_info_and_doc_header_including_copyright_and_license.org
+++ b/org/sisu_version_info_and_doc_header_including_copyright_and_license.org
@@ -32,7 +32,7 @@ encoding: utf-8
- Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2019,
- 2020, 2021, Ralph Amissah,
+ 2020, 2021, 2024, 2025 Ralph Amissah,
All Rights Reserved.
- License: GPL 3 or later:
diff --git a/shell.nix b/shell.nix
index e592f5ea..8ca1596f 100755
--- a/shell.nix
+++ b/shell.nix
@@ -1,6 +1,6 @@
#!/usr/bin/env -S nix-shell --impure
#!nix-shell -i bash
-{pkgs ? import <nixpkgs> {}}:
+{ pkgs ? import <nixpkgs> {} }:
with pkgs;
mkShell {
buildInputs = [