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:
parent
aa27c307d3
commit
2c66a3bcc8
1 changed files with 95 additions and 0 deletions
95
pkgs/by-name/ha/hamrs-pro/package.nix
Normal file
95
pkgs/by-name/ha/hamrs-pro/package.nix
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue