Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
99 lines
2.0 KiB
Nix
99 lines
2.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
libcosmicAppHook,
|
|
just,
|
|
pkg-config,
|
|
alsa-lib,
|
|
ffmpeg,
|
|
glib,
|
|
gst_all_1,
|
|
libglvnd,
|
|
libgbm,
|
|
nix-update-script,
|
|
nixosTests,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "cosmic-player";
|
|
version = "1.0.0-beta.1.1";
|
|
|
|
# nixpkgs-update: no auto update
|
|
src = fetchFromGitHub {
|
|
owner = "pop-os";
|
|
repo = "cosmic-player";
|
|
tag = "epoch-${finalAttrs.version}";
|
|
hash = "sha256-oTTVVQkSkON5NTgO5+eUD2wVpiW5MvW3MZyeyqqc3qk=";
|
|
};
|
|
|
|
cargoHash = "sha256-DodFIfthiGFSvXWfPsPjFhNY6G7z3lb6pfc5HtUXhMo=";
|
|
|
|
nativeBuildInputs = [
|
|
just
|
|
pkg-config
|
|
libcosmicAppHook
|
|
rustPlatform.bindgenHook
|
|
];
|
|
|
|
# Largely based on lilyinstarlight's work linked below
|
|
# https://github.com/lilyinstarlight/nixos-cosmic/blob/main/pkgs/cosmic-player/package.nix
|
|
|
|
buildInputs = [
|
|
alsa-lib
|
|
ffmpeg
|
|
glib
|
|
gst_all_1.gstreamer
|
|
gst_all_1.gst-plugins-base
|
|
gst_all_1.gst-plugins-good
|
|
gst_all_1.gst-plugins-bad
|
|
libgbm
|
|
libglvnd
|
|
];
|
|
|
|
dontUseJustBuild = true;
|
|
dontUseJustCheck = true;
|
|
|
|
justFlags = [
|
|
"--set"
|
|
"prefix"
|
|
(placeholder "out")
|
|
"--set"
|
|
"cargo-target-dir"
|
|
"target/${stdenv.hostPlatform.rust.cargoShortTarget}"
|
|
];
|
|
|
|
postInstall = ''
|
|
libcosmicAppWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
|
|
'';
|
|
|
|
passthru = {
|
|
tests = {
|
|
inherit (nixosTests)
|
|
cosmic
|
|
cosmic-autologin
|
|
cosmic-noxwayland
|
|
cosmic-autologin-noxwayland
|
|
;
|
|
};
|
|
updateScript = nix-update-script {
|
|
extraArgs = [
|
|
"--version"
|
|
"unstable"
|
|
"--version-regex"
|
|
"epoch-(.*)"
|
|
];
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
homepage = "https://github.com/pop-os/cosmic-player";
|
|
description = "Media player for the COSMIC Desktop Environment";
|
|
license = lib.licenses.gpl3Only;
|
|
teams = [ lib.teams.cosmic ];
|
|
platforms = lib.platforms.linux;
|
|
mainProgram = "cosmic-player";
|
|
};
|
|
})
|