nixpkgs/pkgs/applications/editors/codux/default.nix
2023-11-27 02:17:53 +01:00

37 lines
1.0 KiB
Nix

{ lib
, appimageTools
, fetchurl
}:
let
pname = "codux";
version = "15.14.0";
src = fetchurl {
url = "https://github.com/wixplosives/codux-versions/releases/download/${version}/Codux-${version}.x86_64.AppImage";
sha256 = "sha256-GTp9wJrL0TA0Jee1aXKAqmyHfotm7u7gxq/6W8+ermY=";
};
appimageContents = appimageTools.extractType2 { inherit pname version src; };
in
appimageTools.wrapType2 rec {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
cp -r ${appimageContents}/usr/share/icons $out/share
substituteInPlace $out/share/applications/${pname}.desktop --replace 'Exec=AppRun' 'Exec=${pname}'
'';
meta = with lib; {
description = "A visual IDE for React";
homepage = "https://www.codux.com";
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ dit7ya kashw2 ];
mainProgram = "codux";
};
}