diff --git a/assets/rmpc-support-older-rustc.patch b/assets/rmpc-support-older-rustc.patch new file mode 100644 index 00000000..404baea3 --- /dev/null +++ b/assets/rmpc-support-older-rustc.patch @@ -0,0 +1,28 @@ +diff --git a/Cargo.lock b/Cargo.lock +index e4e2d1a..72839b4 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -198,9 +198,9 @@ dependencies = [ + + [[package]] + name = "bitstream-io" +-version = "2.5.0" ++version = "2.3.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "3dcde5f311c85b8ca30c2e4198d4326bc342c76541590106f5fa4a50946ea499" ++checksum = "7c12d1856e42f0d817a835fe55853957c85c8c8a470114029143d3f12671446e" + + [[package]] + name = "built" +@@ -1376,9 +1376,9 @@ dependencies = [ + + [[package]] + name = "ravif" +-version = "0.11.8" ++version = "0.11.5" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "c6ba61c28ba24c0cf8406e025cb29a742637e3f70776e61c27a8a8b72a042d12" ++checksum = "bc13288f5ab39e6d7c9d501759712e6969fcc9734220846fc9ed26cae2cc4234" + dependencies = [ + "avif-serialize", + "imgref", diff --git a/packages/rmpc.nix b/packages/rmpc.nix new file mode 100644 index 00000000..68f89005 --- /dev/null +++ b/packages/rmpc.nix @@ -0,0 +1,39 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, pkg-config +, cmake +}: + +rustPlatform.buildRustPackage rec { + pname = "rmpc"; + version = "0.2.1"; + + src = fetchFromGitHub { + owner = "mierak"; + repo = "rmpc"; + rev = "v${version}"; + hash = "sha256-g+yzW0DfaBhJKTikYZ8eqe4pX8nJvbpJ1xaZ3W/O/bo="; + }; + + cargoHash = "sha256-wFrHgB4wYGeXvfdGf4SJAAL8fE6dAKDLL51Ohmn+1HQ="; + + cargoPatches = [ + ../assets/rmpc-support-older-rustc.patch + ]; + + buildType = "debug"; + + nativeBuildInputs = [ + pkg-config + cmake + ]; + + meta = { + description = "Configurable, terminal-based media player client with album art support via kitty image protocol"; + homepage = "https://github.com/mierak/rmpc"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ donovanglover ]; + mainProgram = "rmpc"; + }; +}