Skip to content

Commit

Permalink
deploy: 403fd2a
Browse files Browse the repository at this point in the history
  • Loading branch information
blaggacao committed Nov 3, 2023
1 parent 382ad6c commit 07bdd82
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 16 deletions.
24 changes: 17 additions & 7 deletions print.html
Original file line number Diff line number Diff line change
Expand Up @@ -1965,6 +1965,7 @@ <h2 id="installables-todo-vs-runnables"><a class="header" href="#installables-to
<pre><code class="language-nix">{
root,
super,
nixpkgs,
}:
/*
Use the Installables Blocktype for targets that you want to
Expand All @@ -1982,6 +1983,7 @@ <h2 id="installables-todo-vs-runnables"><a class="header" href="#installables-to
let
inherit (root) mkCommand actions;
inherit (super) addSelectorFunctor;
l = nixpkgs.lib // builtins;
in
name: {
__functor = addSelectorFunctor;
Expand All @@ -1993,33 +1995,41 @@ <h2 id="installables-todo-vs-runnables"><a class="header" href="#installables-to
fragmentRelPath,
target,
inputs,
}: [
}: let
escapedFragment = l.escapeShellArg fragment;
in [
(actions.build currentSystem target)
# profile commands require a flake ref
(mkCommand currentSystem &quot;install&quot; &quot;install this target&quot; [] ''
# ${target}
nix profile install $PRJ_ROOT#${fragment}
set -x
nix profile install &quot;$PRJ_ROOT#&quot;${escapedFragment}
'' {})
(mkCommand currentSystem &quot;upgrade&quot; &quot;upgrade this target&quot; [] ''
# ${target}
nix profile upgrade $PRJ_ROOT#${fragment}
set -x
nix profile upgrade &quot;$PRJ_ROOT#&quot;${escapedFragment}
'' {})
(mkCommand currentSystem &quot;remove&quot; &quot;remove this target&quot; [] ''
# ${target}
nix profile remove $PRJ_ROOT#${fragment}
set -x
nix profile remove &quot;$PRJ_ROOT#&quot;${escapedFragment}
'' {})
# TODO: use target. `nix bundle` requires a flake ref, but we may be able to use nix-bundle instead as a workaround
(mkCommand currentSystem &quot;bundle&quot; &quot;bundle this target&quot; [] ''
# ${target}
nix bundle --bundler github:Ninlives/relocatable.nix --refresh $PRJ_ROOT#${fragment}
set -x
nix bundle --bundler github:Ninlives/relocatable.nix --refresh &quot;$PRJ_ROOT#&quot;${escapedFragment}
'' {})
(mkCommand currentSystem &quot;bundleImage&quot; &quot;bundle this target to image&quot; [] ''
# ${target}
nix bundle --bundler github:NixOS/bundlers#toDockerImage --refresh $PRJ_ROOT#${fragment}
set -x
nix bundle --bundler github:NixOS/bundlers#toDockerImage --refresh &quot;$PRJ_ROOT#&quot;${escapedFragment}
'' {})
(mkCommand currentSystem &quot;bundleAppImage&quot; &quot;bundle this target to AppImage&quot; [] ''
# ${target}
nix bundle --bundler github:ralismark/nix-appimage --refresh $PRJ_ROOT#${fragment}
set -x
nix bundle --bundler github:ralismark/nix-appimage --refresh &quot;$PRJ_ROOT#&quot;${escapedFragment}
'' {})
];
}
Expand Down
24 changes: 17 additions & 7 deletions reference/blocktypes.html
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ <h2 id="installables-todo-vs-runnables"><a class="header" href="#installables-to
<pre><code class="language-nix">{
root,
super,
nixpkgs,
}:
/*
Use the Installables Blocktype for targets that you want to
Expand All @@ -240,6 +241,7 @@ <h2 id="installables-todo-vs-runnables"><a class="header" href="#installables-to
let
inherit (root) mkCommand actions;
inherit (super) addSelectorFunctor;
l = nixpkgs.lib // builtins;
in
name: {
__functor = addSelectorFunctor;
Expand All @@ -251,33 +253,41 @@ <h2 id="installables-todo-vs-runnables"><a class="header" href="#installables-to
fragmentRelPath,
target,
inputs,
}: [
}: let
escapedFragment = l.escapeShellArg fragment;
in [
(actions.build currentSystem target)
# profile commands require a flake ref
(mkCommand currentSystem &quot;install&quot; &quot;install this target&quot; [] ''
# ${target}
nix profile install $PRJ_ROOT#${fragment}
set -x
nix profile install &quot;$PRJ_ROOT#&quot;${escapedFragment}
'' {})
(mkCommand currentSystem &quot;upgrade&quot; &quot;upgrade this target&quot; [] ''
# ${target}
nix profile upgrade $PRJ_ROOT#${fragment}
set -x
nix profile upgrade &quot;$PRJ_ROOT#&quot;${escapedFragment}
'' {})
(mkCommand currentSystem &quot;remove&quot; &quot;remove this target&quot; [] ''
# ${target}
nix profile remove $PRJ_ROOT#${fragment}
set -x
nix profile remove &quot;$PRJ_ROOT#&quot;${escapedFragment}
'' {})
# TODO: use target. `nix bundle` requires a flake ref, but we may be able to use nix-bundle instead as a workaround
(mkCommand currentSystem &quot;bundle&quot; &quot;bundle this target&quot; [] ''
# ${target}
nix bundle --bundler github:Ninlives/relocatable.nix --refresh $PRJ_ROOT#${fragment}
set -x
nix bundle --bundler github:Ninlives/relocatable.nix --refresh &quot;$PRJ_ROOT#&quot;${escapedFragment}
'' {})
(mkCommand currentSystem &quot;bundleImage&quot; &quot;bundle this target to image&quot; [] ''
# ${target}
nix bundle --bundler github:NixOS/bundlers#toDockerImage --refresh $PRJ_ROOT#${fragment}
set -x
nix bundle --bundler github:NixOS/bundlers#toDockerImage --refresh &quot;$PRJ_ROOT#&quot;${escapedFragment}
'' {})
(mkCommand currentSystem &quot;bundleAppImage&quot; &quot;bundle this target to AppImage&quot; [] ''
# ${target}
nix bundle --bundler github:ralismark/nix-appimage --refresh $PRJ_ROOT#${fragment}
set -x
nix bundle --bundler github:ralismark/nix-appimage --refresh &quot;$PRJ_ROOT#&quot;${escapedFragment}
'' {})
];
}
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searchindex.json

Large diffs are not rendered by default.

0 comments on commit 07bdd82

Please sign in to comment.