21 rustPlatform.buildRustPackage rec {
22 pname = "cosmic-edit";
23 version = "1.0.0-alpha.1";
25 src = fetchFromGitHub {
28 rev = "epoch-${version}";
29 hash = "sha256-ZG5Ctyp2crTDS0WxhQqwN4T6WR5qW79HTbICMlOA3P8=";
33 lockFile = ./Cargo.lock;
35 "accesskit-0.12.2" = "sha256-1UwgRyUe0PQrZrpS7574oNLi13fg5HpgILtZGW6JNtQ=";
36 "atomicwrites-0.4.2" = "sha256-QZSuGPrJXh+svMeFWqAXoqZQxLq/WfIiamqvjJNVhxA=";
37 "clipboard_macos-0.1.0" = "sha256-cG5vnkiyDlQnbEfV2sPbmBYKv1hd3pjJrymfZb8ziKk=";
38 "cosmic-config-0.1.0" = "sha256-DgMh0gqWUmXjBhBySR0CMnv/8O3XbS2BwomU9eNt+4o=";
39 "cosmic-files-0.1.0" = "sha256-QDkHhU0zE0szFwGuVuSYrXd7AUdTU1rYxlAsaHr2YvQ=";
40 "cosmic-syntax-theme-0.1.0" = "sha256-BNb9wrryD5FJImboD3TTdPRIfiBqPpItqwGdT1ZiNng=";
41 "cosmic-text-0.12.1" = "sha256-x0XTxzbmtE2d4XCG/Nuq3DzBpz15BbnjRRlirfNJEiU=";
42 "d3d12-0.19.0" = "sha256-usrxQXWLGJDjmIdw1LBXtBvX+CchZDvE8fHC0LjvhD4=";
43 "glyphon-0.5.0" = "sha256-j1HrbEpUBqazWqNfJhpyjWuxYAxkvbXzRKeSouUoPWg=";
44 "smithay-clipboard-0.8.0" = "sha256-4InFXm0ahrqFrtNLeqIuE3yeOpxKZJZx+Bc0yQDtv34=";
45 "softbuffer-0.4.1" = "sha256-a0bUFz6O8CWRweNt/OxTvflnPYwO5nm6vsyc/WcXyNg=";
46 "taffy-0.3.11" = "sha256-SCx9GEIJjWdoNVyq+RZAGn0N71qraKZxf9ZWhvyzLaI=";
47 "winit-0.29.10" = "sha256-ScTII2AzK3SC8MVeASZ9jhVWsEaGrSQ2BnApTxgfxK4=";
51 # COSMIC applications now uses vergen for the About page
52 # Update the COMMIT_DATE to match when the commit was made
53 env.VERGEN_GIT_COMMIT_DATE = "2024-08-02";
54 env.VERGEN_GIT_SHA = src.rev;
57 substituteInPlace justfile --replace '#!/usr/bin/env' "#!$(command -v env)"
60 nativeBuildInputs = [ just pkg-config makeBinaryWrapper ];
73 dontUseJustBuild = true;
81 "target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-edit"
84 # Force linking to libEGL, which is always dlopen()ed, and to
85 # libwayland-client, which is always dlopen()ed except by the
86 # obscure winit backend.
87 RUSTFLAGS = map (a: "-C link-arg=${a}") [
88 "-Wl,--push-state,--no-as-needed"
94 # LD_LIBRARY_PATH can be removed once tiny-xlib is bumped above 0.2.2
96 wrapProgram "$out/bin/cosmic-edit" \
97 --suffix XDG_DATA_DIRS : "${cosmic-icons}/share" \
98 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [
99 xorg.libX11 xorg.libXcursor xorg.libXi xorg.libXrandr vulkan-loader libxkbcommon wayland
104 homepage = "https://github.com/pop-os/cosmic-edit";
105 description = "Text Editor for the COSMIC Desktop Environment";
106 mainProgram = "cosmic-edit";
107 license = licenses.gpl3Only;
108 maintainers = with maintainers; [ ahoneybun nyabinary ];
109 platforms = platforms.linux;