4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
42 lines
1.1 KiB
Nix
42 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl }:
|
|
let
|
|
arch_table = {
|
|
"x86_64-linux" = "linux-x86_64";
|
|
"i686-linux" = "linux-i686";
|
|
};
|
|
|
|
sha_table = {
|
|
"x86_64-linux" =
|
|
"d9902aadac4f442992877945da2a6fe8d6ea6b0de314ca8ac0c28dc5f253f7d8";
|
|
"i686-linux" =
|
|
"46deb0a053b4910c4e68737a7b6556ff5360260c8f86652f91a0130445f5c949";
|
|
};
|
|
|
|
arch = arch_table.${stdenv.system};
|
|
sha = sha_table.${stdenv.system};
|
|
in stdenv.mkDerivation rec {
|
|
pname = "essentia-extractor";
|
|
version = "2.1_beta2";
|
|
|
|
src = fetchurl {
|
|
url =
|
|
"ftp://ftp.acousticbrainz.org/pub/acousticbrainz/essentia-extractor-v${version}-${arch}.tar.gz";
|
|
sha256 = sha;
|
|
};
|
|
|
|
unpackPhase = "unpackFile $src ; export sourceRoot=.";
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp streaming_extractor_music $out/bin
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://acousticbrainz.org/download";
|
|
description = "AcousticBrainz audio feature extractor";
|
|
license = licenses.agpl3Plus;
|
|
maintainers = with maintainers; [ lovesegfault ];
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
|
};
|
|
}
|