nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 64 lines 1.9 kB view raw
1{ 2 lib, 3 stdenvNoCC, 4 appimageTools, 5 fetchurl, 6 makeWrapper, 7}: 8let 9 pname = "clickup"; 10 version = "3.5.120"; 11 12 src = fetchurl { 13 # Using archive.org because the website doesn't store older versions of the software. 14 url = "https://web.archive.org/web/20250802083833/https://desktop.clickup.com/linux"; 15 hash = "sha256-LVHgXqTxDTsnVJ3zx74TzaSrEs2OD0wl0eioPd4+484="; 16 }; 17 18 appimage = appimageTools.wrapType2 { 19 inherit pname version src; 20 extraPkgs = pkgs: [ pkgs.libxkbfile ]; 21 }; 22 23 appimageContents = appimageTools.extractType2 { inherit pname version src; }; 24in 25stdenvNoCC.mkDerivation { 26 inherit pname version; 27 28 src = appimage; 29 30 nativeBuildInputs = [ makeWrapper ]; 31 32 installPhase = '' 33 runHook preInstall 34 35 mkdir -p $out/ 36 cp -r bin $out/bin 37 38 mkdir -p $out/share/${pname} 39 cp -r ${appimageContents}/locales $out/share/${pname} 40 cp -r ${appimageContents}/resources $out/share/${pname} 41 cp -r --no-preserve=mode ${appimageContents}/usr/share/icons $out/share/ 42 find $out/share/icons -name desktop.png -execdir mv {} clickup.png \; 43 44 install -m 444 -D ${appimageContents}/desktop.desktop $out/share/applications/clickup.desktop 45 46 substituteInPlace $out/share/applications/clickup.desktop \ 47 --replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=clickup' \ 48 --replace-fail 'Icon=desktop' 'Icon=clickup' 49 50 wrapProgram $out/bin/${pname} \ 51 --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}} --no-update" 52 53 runHook postInstall 54 ''; 55 56 meta = { 57 description = "All in one project management solution"; 58 homepage = "https://clickup.com"; 59 license = lib.licenses.unfree; 60 mainProgram = "clickup"; 61 maintainers = with lib.maintainers; [ heisfer ]; 62 platforms = [ "x86_64-linux" ]; 63 }; 64}