diff options
| author | Β·ππ΄πππ©π€ | 2025-12-10 13:00:26 +0000 |
|---|---|---|
| committer | Β·ππ΄πππ©π€ | 2025-12-10 13:00:26 +0000 |
| commit | 6c275ab6cfcbcbdbf99dae089d390b8be0498fbf (patch) | |
| tree | 563b8fa98520ad5d75ceef7042017cc44376d139 | |
| parent | 01fca4dc6a613871dd57ec98000a2c3dfd7d0bb6 (diff) | |
| download | nixtaml-6c275ab6cfcbcbdbf99dae089d390b8be0498fbf.tar nixtaml-6c275ab6cfcbcbdbf99dae089d390b8be0498fbf.tar.gz nixtaml-6c275ab6cfcbcbdbf99dae089d390b8be0498fbf.tar.bz2 nixtaml-6c275ab6cfcbcbdbf99dae089d390b8be0498fbf.tar.lz nixtaml-6c275ab6cfcbcbdbf99dae089d390b8be0498fbf.tar.xz nixtaml-6c275ab6cfcbcbdbf99dae089d390b8be0498fbf.tar.zst nixtaml-6c275ab6cfcbcbdbf99dae089d390b8be0498fbf.zip | |
allow passing in a full nixpkgs source
| -rw-r--r-- | README.rst | 4 | ||||
| -rw-r--r-- | lib/lock_loader.ml | 20 |
2 files changed, 14 insertions, 10 deletions
@@ -193,7 +193,7 @@ See choices at the `makerβs website <https://toast.al/funding>`_. .. [1] :ac:`WIP` with upstream Nixpkgs - β’ Darcs: https://github.com/NixOS/nixpkgs/pull/467172 - β’ Pijul: https://github.com/NixOS/nixpkgs/pull/467890 + β’ :del:`Darcs: https://github.com/NixOS/nixpkgs/pull/467172` + β’ :del:`Pijul: https://github.com/NixOS/nixpkgs/pull/467890` .. vim: set textwidth=80 diff --git a/lib/lock_loader.ml b/lib/lock_loader.ml index b199342..98e86e3 100644 --- a/lib/lock_loader.ml +++ b/lib/lock_loader.ml @@ -98,7 +98,8 @@ let pp_nix_named_args fmt args = let pp_cfg (ppf : Format.formatter) = pp_nix_named_args ppf [ ("system", Some "builtins.currentSystem"); - ("bootstrap-nixpkgs-name", Some "null"); + ("nixpkgs", Some "null"); + ("bootstrap-nixpkgs-lock-name", Some "null"); ] (* TODO: consider *not* doing manually as this is ugly AF, but would probably @@ -201,14 +202,17 @@ let pp_body ~version (ppf : Format.formatter) () = pf ppf {| else@.|}; pf ppf {| throw "Unsupported input kind β${builtins.toString k}β.";@.|}; pf ppf {|@.|}; - pf ppf {| nixpkgs = builtin-to-input "nixpkgs-for-nixtamal" (@.|}; - pf ppf {| if builtins.isNull bootstrap-nixpkgs-name then@.|}; - pf ppf {| lock.i.nixpkgs-nixtamal or lock.i.nixpkgs@.|}; - pf ppf {| else@.|}; - pf ppf {| lock.i.${bootstrap-nixpkgs-name}@.|}; - pf ppf {| );@.|}; + pf ppf {| nixpkgs' = if builtins.isNull nixpkgs then@.|}; + pf ppf {| builtin-to-input "nixpkgs-for-nixtamal" (@.|}; + pf ppf {| if builtins.isString bootstrap-nixpkgs-lock-name then@.|}; + pf ppf {| lock.i.${bootstrap-nixpkgs-lock-name}@.|}; + pf ppf {| else@.|}; + pf ppf {| lock.i.nixpkgs-nixtamal or lock.i.nixpkgs@.|}; + pf ppf {| )@.|}; + pf ppf {| else@.|}; + pf ppf {| nixpkgs;@.|}; pf ppf {|@.|}; - pf ppf {| pkgs = import nixpkgs {inherit system;};@.|}; + pf ppf {| pkgs = import nixpkgs' {inherit system;};@.|}; pf ppf {|@.|}; pf ppf {| inherit (pkgs) lib;@.|}; pf ppf {|@.|}; |
