Tup: Difference between revisions
imported>Sheenobu Add new issue. fix links. |
imported>Ehmry Add flake note |
||
| (One intermediate revision by the same user not shown) | |||
| Line 11: | Line 11: | ||
Github issue: [https://github.com/gittup/tup/issues/397 tup/#397] | Github issue: [https://github.com/gittup/tup/issues/397 tup/#397] | ||
Another method that minimizes changes to PATH is to create symlinks to tools with Tup: | |||
<syntaxhighlight lang="tup"> | |||
# Tuprules.tup - export a bang-rule that calls the Dhall interpreter | |||
DHALL_LINK = $(TUP_CWD)/dhall | |||
!dhall = | $(DHALL_LINK) |> $(DHALL_LINK)/bin/dhall |> | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="tup"> | |||
# Tupfile - build a symlink to the nixpkgs#dhall package | |||
include_rules | |||
: |> nix build nixpkgs#dhall --out-link %o |> $(DHALL_LINK) | |||
</syntaxhighlight> | |||
=== mount does not unmount === | === mount does not unmount === | ||
| Line 36: | Line 50: | ||
You can verify this by adding <code>: |> pkg-config --list-all > %o |> pkg-list.txt</code> into your Tupfile and seeing which libraries are available via pkg-config. | You can verify this by adding <code>: |> pkg-config --list-all > %o |> pkg-list.txt</code> into your Tupfile and seeing which libraries are available via pkg-config. | ||
=== Flakes === | |||
A Tup rule must not use a flake that resides in the same tup project as the rule because the nix command can aggressively access files in the vicinity of flake.nix. The flake should be external to the tup project or it can be stored within the same repository but only on a different branch, which would then then be registered in the local nix flake registry. | |||
[[Category:Applications]] | [[Category:Applications]] | ||