2024-01-13 08:15:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, makeBinaryWrapper
|
|
|
|
, cosmic-icons
|
|
|
|
, just
|
|
|
|
, pkg-config
|
2024-09-19 14:19:46 +00:00
|
|
|
, glib
|
2024-01-13 08:15:51 +00:00
|
|
|
, libxkbcommon
|
|
|
|
, wayland
|
|
|
|
, xorg
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cosmic-files";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "1.0.0-alpha.1";
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pop-os";
|
2024-09-19 14:19:46 +00:00
|
|
|
repo = "cosmic-files";
|
|
|
|
rev = "epoch-${version}";
|
|
|
|
hash = "sha256-UwQwZRzOyMvLRRmU2noxGrqblezkR8J2PNMVoyG0M0w=";
|
2024-01-13 08:15:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-09-19 14:19:46 +00:00
|
|
|
"accesskit-0.12.2" = "sha256-1UwgRyUe0PQrZrpS7574oNLi13fg5HpgILtZGW6JNtQ=";
|
2024-01-13 08:15:51 +00:00
|
|
|
"atomicwrites-0.4.2" = "sha256-QZSuGPrJXh+svMeFWqAXoqZQxLq/WfIiamqvjJNVhxA=";
|
2024-09-19 14:19:46 +00:00
|
|
|
"clipboard_macos-0.1.0" = "sha256-cG5vnkiyDlQnbEfV2sPbmBYKv1hd3pjJrymfZb8ziKk=";
|
|
|
|
"cosmic-client-toolkit-0.1.0" = "sha256-1XtyEvednEMN4MApxTQid4eed19dEN5ZBDt/XRjuda0=";
|
|
|
|
"cosmic-config-0.1.0" = "sha256-d2R5xytwf0BIbllG6elc/nn7nmiC3+VI1g3EiW8WEHA=";
|
|
|
|
"cosmic-text-0.12.1" = "sha256-x0XTxzbmtE2d4XCG/Nuq3DzBpz15BbnjRRlirfNJEiU=";
|
2024-04-21 15:54:59 +00:00
|
|
|
"d3d12-0.19.0" = "sha256-usrxQXWLGJDjmIdw1LBXtBvX+CchZDvE8fHC0LjvhD4=";
|
2024-09-19 14:19:46 +00:00
|
|
|
"fs_extra-1.3.0" = "sha256-ftg5oanoqhipPnbUsqnA4aZcyHqn9XsINJdrStIPLoE=";
|
2024-04-21 15:54:59 +00:00
|
|
|
"glyphon-0.5.0" = "sha256-j1HrbEpUBqazWqNfJhpyjWuxYAxkvbXzRKeSouUoPWg=";
|
2024-09-19 14:19:46 +00:00
|
|
|
"smithay-clipboard-0.8.0" = "sha256-4InFXm0ahrqFrtNLeqIuE3yeOpxKZJZx+Bc0yQDtv34=";
|
2024-04-21 15:54:59 +00:00
|
|
|
"softbuffer-0.4.1" = "sha256-a0bUFz6O8CWRweNt/OxTvflnPYwO5nm6vsyc/WcXyNg=";
|
2024-01-13 08:15:51 +00:00
|
|
|
"taffy-0.3.11" = "sha256-SCx9GEIJjWdoNVyq+RZAGn0N71qraKZxf9ZWhvyzLaI=";
|
2024-09-19 14:19:46 +00:00
|
|
|
"trash-5.0.0" = "sha256-6cMo2GtMJjU+fbehlsGNmj3LbzSP+vOjA4en3OgmZ54=";
|
2024-04-21 15:54:59 +00:00
|
|
|
"winit-0.29.10" = "sha256-ScTII2AzK3SC8MVeASZ9jhVWsEaGrSQ2BnApTxgfxK4=";
|
2024-01-13 08:15:51 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
# COSMIC applications now uses vergen for the About page
|
|
|
|
# Update the COMMIT_DATE to match when the commit was made
|
2024-09-19 14:19:46 +00:00
|
|
|
env.VERGEN_GIT_COMMIT_DATE = "2024-08-05";
|
2024-04-21 15:54:59 +00:00
|
|
|
env.VERGEN_GIT_SHA = src.rev;
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace justfile --replace '#!/usr/bin/env' "#!$(command -v env)"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ just pkg-config makeBinaryWrapper ];
|
2024-09-19 14:19:46 +00:00
|
|
|
buildInputs = [ glib libxkbcommon wayland ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
dontUseJustBuild = true;
|
|
|
|
|
|
|
|
justFlags = [
|
|
|
|
"--set"
|
|
|
|
"prefix"
|
|
|
|
(placeholder "out")
|
|
|
|
"--set"
|
|
|
|
"bin-src"
|
|
|
|
"target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-files"
|
|
|
|
];
|
|
|
|
|
|
|
|
# LD_LIBRARY_PATH can be removed once tiny-xlib is bumped above 0.2.2
|
|
|
|
postInstall = ''
|
2024-09-19 14:19:46 +00:00
|
|
|
wrapProgram "$out/bin/cosmic-files" \
|
2024-01-13 08:15:51 +00:00
|
|
|
--suffix XDG_DATA_DIRS : "${cosmic-icons}/share" \
|
2024-09-19 14:19:46 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ xorg.libX11 xorg.libXcursor xorg.libXrandr xorg.libXi wayland ]}
|
2024-01-13 08:15:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/pop-os/cosmic-files";
|
|
|
|
description = "File Manager for the COSMIC Desktop Environment";
|
|
|
|
license = licenses.gpl3Only;
|
2024-09-26 11:04:55 +00:00
|
|
|
maintainers = with maintainers; [ ahoneybun nyabinary ];
|
2024-01-13 08:15:51 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|