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
105 lines
2.2 KiB
Nix
105 lines
2.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
just,
|
|
libcosmicAppHook,
|
|
glib,
|
|
nix-update-script,
|
|
nixosTests,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "cosmic-files";
|
|
version = "1.0.0-beta.1.1";
|
|
|
|
# nixpkgs-update: no auto update
|
|
src = fetchFromGitHub {
|
|
owner = "pop-os";
|
|
repo = "cosmic-files";
|
|
tag = "epoch-${finalAttrs.version}";
|
|
hash = "sha256-pSjmsWsGGhjCekMTX8iiNVbF5X33zg5YVDWtemjIDWU=";
|
|
};
|
|
|
|
cargoHash = "sha256-7RANj+aXdmBVO66QDgcNrrU4qEGK4Py4+ZctYWU1OO8=";
|
|
|
|
nativeBuildInputs = [
|
|
just
|
|
libcosmicAppHook
|
|
rustPlatform.bindgenHook
|
|
];
|
|
|
|
buildInputs = [ glib ];
|
|
|
|
dontUseJustBuild = true;
|
|
dontUseJustCheck = true;
|
|
|
|
justFlags = [
|
|
"--set"
|
|
"prefix"
|
|
(placeholder "out")
|
|
"--set"
|
|
"cargo-target-dir"
|
|
"target/${stdenv.hostPlatform.rust.cargoShortTarget}"
|
|
];
|
|
|
|
# This is needed since by setting cargoBuildFlags, it would build both the applet and the main binary
|
|
# at the same time, which would cause problems with the desktop items applet
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
defaultCargoBuildFlags="$cargoBuildFlags"
|
|
|
|
cargoBuildFlags="$defaultCargoBuildFlags --package cosmic-files"
|
|
runHook cargoBuildHook
|
|
|
|
cargoBuildFlags="$defaultCargoBuildFlags --package cosmic-files-applet"
|
|
runHook cargoBuildHook
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
|
|
defaultCargoTestFlags="$cargoTestFlags"
|
|
|
|
cargoTestFlags="$defaultCargoTestFlags --package cosmic-files"
|
|
runHook cargoCheckHook
|
|
|
|
cargoTestFlags="$defaultCargoTestFlags --package cosmic-files-applet"
|
|
runHook cargoCheckHook
|
|
|
|
runHook postCheck
|
|
'';
|
|
|
|
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-files";
|
|
description = "File Manager for the COSMIC Desktop Environment";
|
|
license = lib.licenses.gpl3Only;
|
|
mainProgram = "cosmic-files";
|
|
teams = [ lib.teams.cosmic ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|