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
82 lines
2.1 KiB
Nix
82 lines
2.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
undmg,
|
|
appimageTools,
|
|
makeWrapper,
|
|
}:
|
|
|
|
let
|
|
|
|
pname = "sleek-todo";
|
|
version = "2.0.14";
|
|
|
|
src =
|
|
fetchurl
|
|
{
|
|
x86_64-darwin = {
|
|
url = "https://github.com/ransome1/sleek/releases/download/v${version}/sleek-2.0.14-mac-x64.dmg";
|
|
hash = "sha256-f5mMSRa+gAoakOy9TSZeALqCylGLd0nUJIh8o+LWAro=";
|
|
};
|
|
x86_64-linux = {
|
|
url = "https://github.com/ransome1/sleek/releases/download/v${version}/sleek-2.0.14.AppImage";
|
|
hash = "sha256-d2fLsCI7peuNBtjgHs1qumgPAF9eJeBYiIIffoSv9Jk=";
|
|
};
|
|
}
|
|
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.system}");
|
|
|
|
meta = {
|
|
description = "Todo manager based on todo.txt syntax";
|
|
homepage = "https://github.com/ransome1/sleek";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ ByteSudoer ];
|
|
mainProgram = "sleek-todo";
|
|
platforms = [
|
|
"x86_64-linux"
|
|
"x86_64-darwin"
|
|
];
|
|
};
|
|
appimageContents = appimageTools.extract { inherit pname version src; };
|
|
in
|
|
if stdenv.hostPlatform.isDarwin then
|
|
stdenv.mkDerivation {
|
|
inherit
|
|
pname
|
|
version
|
|
src
|
|
meta
|
|
;
|
|
|
|
sourceRoot = ".";
|
|
nativeBuildInputs = [ undmg ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out/Applications
|
|
cp -r *.app $out/Applications/
|
|
runHook postInstall
|
|
'';
|
|
}
|
|
else
|
|
appimageTools.wrapType2 {
|
|
inherit
|
|
pname
|
|
version
|
|
src
|
|
meta
|
|
;
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
extraInstallCommands = ''
|
|
wrapProgram $out/bin/sleek-todo \
|
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
|
|
mkdir -p $out/share/{applications,sleek}
|
|
cp -a ${appimageContents}/{locales,resources} $out/share/sleek
|
|
cp -a ${appimageContents}/usr/share/icons $out/share
|
|
install -Dm 444 ${appimageContents}/sleek.desktop $out/share/applications
|
|
substituteInPlace $out/share/applications/sleek.desktop \
|
|
--replace-warn 'Exec=AppRun' 'Exec=${pname}'
|
|
'';
|
|
|
|
}
|