nixpkgs/pkgs/applications/editors/codux/default.nix
Peder Bergebakken Sundt 985aa8174d treewide: unbreak appimageTools.wrapType2 builds
`appimageTools.wrapType2` no longer creates a binary `$out/bin/${name}` if `pname` and `version` is provided.
Derivations that have worked around this behavior with a `mv $out/bin/{${name},${pname}}` broke as a result.
This should fix most instances.

contex: #271071
2024-04-24 15:26:52 +02:00

36 lines
985 B
Nix

{ lib
, appimageTools
, fetchurl
}:
let
pname = "codux";
version = "15.23.1";
src = fetchurl {
url = "https://github.com/wixplosives/codux-versions/releases/download/${version}/Codux-${version}.x86_64.AppImage";
sha256 = "sha256-9ZzWsLEPEG+PDrDf9lU4ODGOD6/fvMbGBSo9BEQrkn4=";
};
appimageContents = appimageTools.extractType2 { inherit pname version src; };
in
appimageTools.wrapType2 rec {
inherit pname version src;
extraInstallCommands = ''
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";
};
}