Skip to content

Commit

Permalink
Merge pull request #316835 from eclairevoyant/fix-chrysalis-script
Browse files Browse the repository at this point in the history
chrysalis: mark update script executable, fix source provenance, and other cleanup
  • Loading branch information
eclairevoyant authored Jun 24, 2024
2 parents 17abd6c + 5cca28c commit a4853d2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions pkgs/by-name/ch/chrysalis/package.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{ lib, appimageTools, fetchurl }:
{
lib,
appimageTools,
fetchurl,
}:

let
pname = "chrysalis";
version = "0.13.3";
name = "${pname}-${version}-binary";
src = fetchurl {
url =
"https://github.com/keyboardio/${pname}/releases/download/v${version}/${pname}-${version}-x64.AppImage";
hash =
"sha512-F6Y87rgIclj1OA3gVX/gqqp9AvXKQlBXrbqk/26F1KHPF9NzHJgVmeszSo3Nhb6xg4CzWmzkqc8IW2H/Bg57kw==";
url = "https://github.com/keyboardio/chrysalis/releases/download/v${version}/chrysalis-${version}-x64.AppImage";
hash = "sha512-F6Y87rgIclj1OA3gVX/gqqp9AvXKQlBXrbqk/26F1KHPF9NzHJgVmeszSo3Nhb6xg4CzWmzkqc8IW2H/Bg57kw==";
};
appimageContents = appimageTools.extract { inherit name src; };
in appimageTools.wrapType2 rec {
inherit name pname src;
appimageContents = appimageTools.extract { inherit pname version src; };
in
appimageTools.wrapType2 {
inherit pname version src;

extraPkgs = pkgs: [ pkgs.glib ];

Expand All @@ -30,7 +32,7 @@ in appimageTools.wrapType2 rec {
-t $out/share/applications
substituteInPlace \
$out/share/applications/Chrysalis.desktop \
--replace 'Exec=Chrysalis' 'Exec=${pname}'
--replace-fail 'Exec=Chrysalis' 'Exec=${pname}'
install -Dm444 ${appimageContents}/usr/share/icons/hicolor/256x256/chrysalis.png -t $out/share/pixmaps
'';
Expand All @@ -40,9 +42,15 @@ in appimageTools.wrapType2 rec {
meta = with lib; {
description = "Graphical configurator for Kaleidoscope-powered keyboards";
homepage = "https://github.com/keyboardio/Chrysalis";
license = licenses.gpl3Only;
maintainers = with maintainers; [ aw eclairevoyant nshalman ];
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
aw
eclairevoyant
nshalman
];
platforms = [ "x86_64-linux" ];
mainProgram = "chrysalis";
# buildFHSEnv will create a symlink in $out/bin/${pname}
mainProgram = pname;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
}
Empty file modified pkgs/by-name/ch/chrysalis/update.sh
100644 → 100755
Empty file.

0 comments on commit a4853d2

Please sign in to comment.