Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port over to rusty-chromaprint #41

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ sudo apt-get install \
cargo install --path .
```

This will **dynamically** link against FFmpeg and statically link `chromaprint`.
This will **dynamically** link against FFmpeg.

#### Dynamic

Expand Down Expand Up @@ -223,7 +223,7 @@ brew install cmake pkg-config ffmpeg
cargo install --path .
```

This will **dynamically** link against FFmpeg. `chromaprint` will be statically linked.
This will **dynamically** link against FFmpeg.

### Windows

Expand All @@ -242,15 +242,15 @@ cargo vcpkg build
3. Build:

```bash
# Statically link against both FFmpeg and chromaprint
# Statically link against FFmpeg.
cargo build --release --features static
```

#### Dynamic

1. Set the following environment variables:

a. To dynamically link **both** FFmpeg and `chromaprint`:
a. To dynamically link FFmpeg:

```powershell
# Powershell
Expand All @@ -264,18 +264,6 @@ cargo build --release --features static
export VCPKGRS_TRIPLET='x64-windows'
```

b. Just `chromaprint`:

```powershell
# Powershell
$env:CHROMAPRINT_SYS_DYNAMIC='1'
```

```bash
# Git bash
export CHROMAPRINT_SYS_DYNAMIC=1
```

2. Build deps:

```
Expand Down
4 changes: 1 addition & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
inherit pname;
inherit version;
src = ./needle;
cargoSha256 = "sha256-aUKzSbyniuk2+UZmrUZjMv+yhcjn+eilnZtCMxzJLZo=";
cargoSha256 = "sha256-CUcjt7BLvTSaiiYCuzVilEf0y1zN08Bo8YtvKFVTSiM=";
# nativeBuildInputs: used only in build phase
nativeBuildInputs = [
pkgs.cmake
Expand All @@ -30,7 +30,6 @@
# buildInputs: used only at runtime (i.e., linked against)
# https://nixos.org/manual/nixpkgs/stable/#ssec-stdenv-dependencies-overview
buildInputs = [
pkgs.chromaprint
pkgs.ffmpeg-full
] ++ pkgs.lib.optionals pkgs.stdenv.isLinux [
pkgs.fftw
Expand Down Expand Up @@ -58,7 +57,6 @@
in {
default = pkgs.mkShell {
buildInputs = [
pkgs.chromaprint
pkgs.ffmpeg-full
pkgs.libiconv # required by rust-ffmpeg build script
pkgs.pkg-config
Expand Down
Loading
Loading