-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include more installation commands, split out source installation to a separate page.
- Loading branch information
Showing
2 changed files
with
22 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,42 @@ | ||
# Installation | ||
|
||
## Installing a binary | ||
|
||
Difftastic [provides GitHub | ||
releases](https://github.com/Wilfred/difftastic/releases) with | ||
prebuilt binaries. The | ||
[changelog](https://github.com/Wilfred/difftastic/blob/master/CHANGELOG.md) | ||
describes the changes in each release. | ||
|
||
Packages are also available on the following platforms. | ||
|
||
[![Packaging status](https://repology.org/badge/vertical-allrepos/difftastic.svg)](https://repology.org/project/difftastic/versions) | ||
|
||
|
||
## Installing via homebrew (on macOS or Linux) | ||
|
||
Difftastic can be installed with [Homebrew](https://formulae.brew.sh/formula/difftastic) on macOS or Linux. | ||
prebuilt binaries for Windows, macOS and Linux. | ||
|
||
If you're a Homebrew user, you can install | ||
[difftastic](https://formulae.brew.sh/formula/difftastic) with `brew`. | ||
|
||
``` | ||
$ brew install difftastic | ||
``` | ||
|
||
## Installing from source | ||
|
||
### Build Requirements | ||
If you're an Arch Linux user, you can install | ||
[difftastic](https://archlinux.org/packages/extra/x86_64/difftastic/) | ||
with `pacman`. | ||
|
||
Difftastic is written in Rust, so you will need Rust installed. I | ||
recommend [rustup](https://rustup.rs/) to install Rust. Difftastic | ||
requires Rust version 1.65 or later. | ||
|
||
You will also need a C++ compiler that supports C++14. If you're using | ||
GCC, you need at least version 8. | ||
|
||
### Build | ||
``` | ||
$ sudo pacman -S difftastic | ||
``` | ||
|
||
You can download and build [difftastic on | ||
crates.io](https://crates.io/crates/difftastic) with Cargo (which is | ||
part of Rust). | ||
If you're a Nix user, you can install | ||
[difftastic](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/text/difftastic/default.nix) | ||
with `nix-env`. | ||
|
||
``` | ||
$ cargo install --locked difftastic | ||
$ nix-env --install ripgrep | ||
``` | ||
|
||
Difftastic uses the `cc` crate for building C/C++ dependencies. This | ||
allows you to use environment variables `CC` and `CXX` to control the | ||
compiler used (see [the cc | ||
docs](https://github.com/alexcrichton/cc-rs#external-configuration-via-environment-variables)). | ||
If you're a Fedora user, you can install [difftastic](https://packages.fedoraproject.org/pkgs/rust-difftastic/difftastic/) with `dnf`. | ||
|
||
See [contributing](./contributing.md) for instructions on debug | ||
builds. | ||
``` | ||
$ sudo dnf install difftastic | ||
``` | ||
|
||
## (Optional) Install MIME Database | ||
## Full Package Listing | ||
|
||
If a MIME database is available, difftastic will use it to detect | ||
binary files more accurately. This is the same database used by the | ||
`file` command, so you probably already have it. | ||
The following table includes a list of all the platforms that provide | ||
difftastic packages. | ||
|
||
The MIME database path is [specified in the XDG | ||
specification](https://specifications.freedesktop.org/shared-mime-info-spec/0.11/ar01s03.html). The | ||
database should be at one of the following paths: | ||
[![Packaging status](https://repology.org/badge/vertical-allrepos/difftastic.svg)](https://repology.org/project/difftastic/versions) | ||
|
||
* `/usr/share/mime/magic` | ||
* `/usr/local/share/mime/magic` | ||
* `$HOME/.local/share/mime/magic` |