Template:Nixpkgs Link: Difference between revisions

From NixOS Wiki
imported>Samueldr
mNo edit summary
Sdht0 (talk | contribs)
Add proper sections
Line 1: Line 1:
<noinclude>
<noinclude>
== About ==
Creates a link to a file in the Nixpkgs repo.
== Usage ==
== Examples ==
* {{ic|<nowiki>{{Nixpkgs Link|pkgs/top-level/all-packages.nix}}</nowiki>}}
* {{ic|<nowiki>{{Nixpkgs Link|short=all-packages.nix|pkgs/top-level/all-packages.nix}}</nowiki>}}
* {{ic|<nowiki>{{Nixpkgs Link|pkgs/top-level/all-packages.nix|revision=f3ecd570ed68a801ff7f1522319d4fa5caf774c5}}</nowiki>}}
== Examples ==
* {{Nixpkgs Link|pkgs/top-level/all-packages.nix}}
* {{Nixpkgs Link|short=all-packages.nix|pkgs/top-level/all-packages.nix}}
* {{Nixpkgs Link|short=all-packages.nix|pkgs/top-level/all-packages.nix}}
* {{Nixpkgs Link|pkgs/top-level/all-packages.nix}}
* {{Nixpkgs Link|pkgs/top-level/all-packages.nix|revision=f3ecd570ed68a801ff7f1522319d4fa5caf774c5}}
* {{Nixpkgs Link|pkgs/top-level/all-packages.nix|revision=f3ecd570ed68a801ff7f1522319d4fa5caf774c5}}
</noinclude><includeonly>{{#if: {{{1}}}|<code>[[File:nixpkgs-link.png|link=https://github.com/NixOS/nixpkgs/blob/{{{revision|master}}}/{{{1}}}]]&#65279;[https://github.com/NixOS/nixpkgs/blob/{{{revision|master}}}/{{{1}}}  {{{short|{{{1}}}}}}]</code>|<em style="color: red">No path given to Nixpkgs Link</em>}}</includeonly>
</noinclude><includeonly>{{#if: {{{1}}}|<code>[[File:nixpkgs-link.png|link=https://github.com/NixOS/nixpkgs/blob/{{{revision|master}}}/{{{1}}}]]&#65279;[https://github.com/NixOS/nixpkgs/blob/{{{revision|master}}}/{{{1}}}  {{{short|{{{1}}}}}}]</code>|<em style="color: red">No path given to Nixpkgs Link</em>}}</includeonly>

Revision as of 20:35, 6 April 2024


About

Creates a link to a file in the Nixpkgs repo.

Usage

Examples

  • {{Nixpkgs Link|pkgs/top-level/all-packages.nix}}
  • {{Nixpkgs Link|short=all-packages.nix|pkgs/top-level/all-packages.nix}}
  • {{Nixpkgs Link|pkgs/top-level/all-packages.nix|revision=f3ecd570ed68a801ff7f1522319d4fa5caf774c5}}

Examples