mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 21:10:08 +00:00
oklch-color-picker: add desktop entry
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
libxkbcommon,
|
||||
libGL,
|
||||
stdenv,
|
||||
makeDesktopItem,
|
||||
copyDesktopItems,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
@@ -24,7 +26,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
|
||||
cargoHash = "sha256-FB8zvWhO+ZbzWjkQCnf3ghgM+IL4px7QNO4dLPcczec=";
|
||||
|
||||
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
|
||||
nativeBuildInputs = [
|
||||
copyDesktopItems
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
|
||||
|
||||
runtimeDependencies = [
|
||||
libGL
|
||||
@@ -38,6 +43,24 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
doInstallCheck = true;
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
postInstall = ''
|
||||
install -Dm444 assets/icon.png $out/share/icons/hicolor/512x512/apps/${finalAttrs.meta.mainProgram}.png
|
||||
'';
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = finalAttrs.meta.mainProgram;
|
||||
exec = finalAttrs.meta.mainProgram;
|
||||
icon = finalAttrs.meta.mainProgram;
|
||||
desktopName = "OKLCH Color Picker";
|
||||
genericName = "Color Picker";
|
||||
comment = finalAttrs.meta.description;
|
||||
categories = [
|
||||
"Graphics"
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Color picker for Oklch";
|
||||
longDescription = ''
|
||||
@@ -46,6 +69,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
'';
|
||||
homepage = "https://github.com/eero-lehtinen/oklch-color-picker";
|
||||
changelog = "https://github.com/eero-lehtinen/oklch-color-picker/releases/tag/${finalAttrs.version}";
|
||||
mainProgram = "oklch-color-picker";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ videl ];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user