Skip to content

Commit

Permalink
code-cursor: prepare for Darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahec committed Jan 13, 2025
1 parent c89b16f commit 3e0982c
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions pkgs/by-name/co/code-cursor/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
writeScript,
}:
let
inherit (stdenvNoCC.hostPlatform) system;

pname = "cursor";
version = "0.44.11";
appKey = "230313mzl4w4u92";
Expand All @@ -27,22 +29,15 @@ let
"aarch64-linux"
];


src = sources.${stdenvNoCC.hostPlatform.system};
src = sources.${system};

appimageContents = appimageTools.extractType2 {
inherit version pname src;
};

in
stdenvNoCC.mkDerivation {
inherit pname version;

src = appimageTools.wrapType2 { inherit version pname src; };

nativeBuildInputs = [ makeWrapper ];
wrappedAppImage = appimageTools.wrapType2 { inherit version pname src; };

installPhase = ''
appimageInstall = ''
runHook preInstall
mkdir -p $out/
Expand All @@ -62,6 +57,16 @@ stdenvNoCC.mkDerivation {
runHook postInstall
'';

in
stdenvNoCC.mkDerivation {
inherit pname version;

src = wrappedAppImage;

nativeBuildInputs = [ makeWrapper ];

installPhase = appimageInstall;

passthru = {
inherit sources;
updateScript = writeScript "update.sh" ''
Expand Down

0 comments on commit 3e0982c

Please sign in to comment.