0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

hamrs-pro: init at 2.33.0

Hamrs PRO is the next version of hamrs. It has both Linux and Darwin
support.

Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
This commit is contained in:
Ethan Carter Edwards 2025-03-16 16:19:23 -04:00
parent aa27c307d3
commit 2c66a3bcc8
No known key found for this signature in database
GPG key ID: D83DC5377393C7E6

View file

@ -0,0 +1,95 @@
{
lib,
stdenvNoCC,
appimageTools,
fetchurl,
_7zz,
}:
let
pname = "hamrs-pro";
version = "2.33.0";
throwSystem = throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}";
srcs = {
x86_64-linux = fetchurl {
url = "https://hamrs-dist.s3.amazonaws.com/hamrs-pro-${version}-linux-x86_64.AppImage";
hash = "sha256-FUwyyuXtWaHauZyvRvrH7KDC0du02eNR5TfKJyiKb9k=";
};
aarch64-linux = fetchurl {
url = "https://hamrs-dist.s3.amazonaws.com/hamrs-pro-${version}-linux-arm64.AppImage";
hash = "sha256-YQPKxjaNXE1AgEspZRLI1OUFU71rAU8NBcS0Jv94MS8=";
};
x86_64-darwin = fetchurl {
url = "https://hamrs-dist.s3.amazonaws.com/hamrs-pro-${version}-mac-x64.dmg";
hash = "sha256-KtrXF47AwVAUXYk1Wu2aKMTXENv7q9JBb86Oy+UHQYY=";
};
aarch64-darwin = fetchurl {
url = "https://hamrs-dist.s3.amazonaws.com/hamrs-pro-${version}-mac-arm64.dmg";
hash = "sha256-H46z4V9lo+n/pZzna7KIiYxQBqTlZULitQrFEEMFDvo=";
};
};
src = srcs.${stdenvNoCC.hostPlatform.system} or throwSystem;
meta = {
homepage = "https://hamrs.app/";
description = "Simple, portable logger tailored for activities like Parks on the Air, Field Day, and more";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ ethancedwards8 ];
platforms = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
};
linux = appimageTools.wrapType2 rec {
inherit
pname
version
src
meta
;
extraInstallCommands =
let
contents = appimageTools.extract { inherit pname version src; };
in
''
install -m 444 -D ${contents}/${pname}.desktop -t $out/share/applications
substituteInPlace $out/share/applications/${pname}.desktop \
--replace-fail 'Exec=AppRun' 'Exec=${pname}'
cp -r ${contents}/usr/share/icons $out/share
'';
};
darwin = stdenvNoCC.mkDerivation {
inherit
pname
version
src
meta
;
nativeBuildInputs = [ _7zz ];
sourceRoot = ".";
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
cp -r *.app $out/Applications
runHook postInstall
'';
};
in
if stdenvNoCC.hostPlatform.isDarwin then darwin else linux