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
36 lines
1.2 KiB
Nix
36 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, pkgconfig, openssl, python3, libxcb, AppKit, Security }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "spotify-tui";
|
|
version = "0.23.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Rigellute";
|
|
repo = "spotify-tui";
|
|
rev = "v${version}";
|
|
sha256 = "082y5m2vglzx9kdc2088zynz0njcnljnb0y170igmlsxq9wkrgg2";
|
|
};
|
|
|
|
cargoSha256 = "100c7x603qyhav3p24clwfal4ngh0258x9lqsi84kcj4wq2f3i8f";
|
|
|
|
nativeBuildInputs = [ installShellFiles ] ++ stdenv.lib.optionals stdenv.isLinux [ pkgconfig python3 ];
|
|
buildInputs = [ ]
|
|
++ stdenv.lib.optionals stdenv.isLinux [ openssl libxcb ]
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ AppKit Security ];
|
|
|
|
postInstall = ''
|
|
for shell in bash fish zsh; do
|
|
$out/bin/spt --completions $shell > spt.$shell
|
|
installShellCompletion spt.$shell
|
|
done
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Spotify for the terminal written in Rust";
|
|
homepage = "https://github.com/Rigellute/spotify-tui";
|
|
changelog = "https://github.com/Rigellute/spotify-tui/blob/v${version}/CHANGELOG.md";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ jwijenbergh ];
|
|
};
|
|
}
|