Install wire
How to install wire tool.
INFO
The wire binary and the wire.makeHive function are tightly coupled, so it is recommended that you use the same version for both.
It is recommended you stick to either using a tagged version of wire, or the stable branch which tracks the latest stable tag.
Binary Cache
You should enable the garnix binary cache.
Installation through flakes
When using flakes, you should install wire through the same input you create your hive from, sourced from the stable branch.
nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
wire.url = "github:mrshmllow/wire/stable";
# alternatively, you can use a tag instead:
# wire.url = "github:mrshmllow/wire/v1.0.0-beta.0";
systems.url = "github:nix-systems/default";
};
outputs = {
nixpkgs,
wire,
systems,
...
}: let
forAllSystems = nixpkgs.lib.genAttrs (import systems);
in {
wire = wire.makeHive {
meta.nixpkgs = import nixpkgs {localSystem = "x86_64-linux";};
# Continue to next How-To guide to fill this section
};
devShells = forAllSystems (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
default = pkgs.mkShell {
buildInputs = [
wire.packages.${system}.wire
];
};
}
);
};
}Installation through npins
With npins you may allow it to use release tags instead of the stable branch.
Using npins specifically is not required, you can pin your sources in any way you'd like, really.
sh
$ npins add github mrshmllow wire --branch stableAlternatively, you can use a tag instead:
sh
$ npins add github mrshmllow wire --at v1.0.0-beta.0Then, use this pinned version of wire for both your hive.nix and shell.nix:
nix
let
sources = import ./npins;
pkgs = import sources.nixpkgs {};
wire = import sources.wire;
in
pkgs.mkShell {
packages = [
wire.packages.${builtins.currentSystem}.wire
pkgs.npins
];
}nix
let
sources = import ./npins;
wire = import sources.wire;
in
wire.makeHive {
# give wire nixpkgs from npins
meta.nixpkgs = import sources.nixpkgs {};
# Continue to next How-To guide to fill this section
}