lol

hamrs: prepare to add darwin, modernize

Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>

+60 -40
+48
pkgs/by-name/ha/hamrs/linux.nix
··· 1 + { 2 + lib, 3 + stdenvNoCC, 4 + appimageTools, 5 + fetchurl, 6 + pname, 7 + version, 8 + meta, 9 + }: 10 + 11 + let 12 + suffix = 13 + { 14 + aarch64-linux = "linux-armv7l"; 15 + x86_64-linux = "linux-x86_64"; 16 + i686-linux = "linux-i386"; 17 + } 18 + .${stdenvNoCC.hostPlatform.system} 19 + or (throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}"); 20 + in 21 + appimageTools.wrapType2 rec { 22 + inherit pname version; 23 + 24 + src = fetchurl { 25 + url = "https://hamrs-releases.s3.us-east-2.amazonaws.com/${version}/hamrs-${version}-${suffix}.AppImage"; 26 + hash = 27 + { 28 + aarch64-linux = "sha256-nBW8q7LVWQz93LkTc+c36H+2ymLLwLKfxePUwEm3D2E="; 29 + x86_64-linux = "sha256-tplp7TADvbxkk5qBb4c4zm4mrzrVtW/WVUjiolBBJHc="; 30 + i686-linux = "sha256-PllxLMBsPCedKU7OUN0nqi4qtQ57l2Z+huLfkfaBfT4="; 31 + } 32 + .${stdenvNoCC.hostPlatform.system} 33 + or (throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}"); 34 + }; 35 + 36 + extraInstallCommands = 37 + let 38 + contents = appimageTools.extract { inherit pname version src; }; 39 + in 40 + '' 41 + install -m 444 -D ${contents}/${pname}.desktop -t $out/share/applications 42 + substituteInPlace $out/share/applications/${pname}.desktop \ 43 + --replace-fail 'Exec=AppRun' 'Exec=${pname}' 44 + cp -r ${contents}/usr/share/icons $out/share 45 + ''; 46 + 47 + inherit meta; 48 + }
+12 -40
pkgs/by-name/ha/hamrs/package.nix
··· 1 1 { 2 - appimageTools, 3 2 lib, 4 - fetchurl, 5 - stdenv, 3 + stdenvNoCC, 4 + callPackage, 6 5 }: 7 6 8 7 let 9 - suffix = 10 - { 11 - aarch64-linux = "linux-armv7l"; 12 - x86_64-linux = "linux-x86_64"; 13 - i686-linux = "linux-i386"; 14 - } 15 - .${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); 16 - in 17 - appimageTools.wrapType2 rec { 18 8 pname = "hamrs"; 19 9 version = "1.0.7"; 20 10 21 - src = fetchurl { 22 - url = "https://hamrs-releases.s3.us-east-2.amazonaws.com/${version}/hamrs-${version}-${suffix}.AppImage"; 23 - hash = 24 - { 25 - aarch64-linux = "sha256-nBW8q7LVWQz93LkTc+c36H+2ymLLwLKfxePUwEm3D2E="; 26 - x86_64-linux = "sha256-tplp7TADvbxkk5qBb4c4zm4mrzrVtW/WVUjiolBBJHc="; 27 - i686-linux = "sha256-PllxLMBsPCedKU7OUN0nqi4qtQ57l2Z+huLfkfaBfT4="; 28 - } 29 - .${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); 30 - }; 31 - 32 - extraInstallCommands = 33 - let 34 - contents = appimageTools.extract { inherit pname version src; }; 35 - in 36 - '' 37 - install -m 444 -D ${contents}/${pname}.desktop -t $out/share/applications 38 - substituteInPlace $out/share/applications/${pname}.desktop \ 39 - --replace-fail 'Exec=AppRun' 'Exec=${pname}' 40 - cp -r ${contents}/usr/share/icons $out/share 41 - ''; 42 - 43 - meta = with lib; { 44 - description = "A simple, portable logger tailored for activities like Parks on the Air, Field Day, and more."; 11 + meta = { 12 + description = "Simple, portable logger tailored for activities like Parks on the Air, Field Day, and more."; 45 13 homepage = "https://hamrs.app/"; 46 - license = licenses.unfree; 47 - maintainers = [ maintainers.jhollowe ]; 14 + license = lib.licenses.unfree; 15 + maintainers = with lib.maintainers; [ 16 + ethancedwards8 17 + jhollowe 18 + ]; 48 19 platforms = [ 49 20 "aarch64-linux" 50 21 "x86_64-linux" 51 22 "i686-linux" 52 23 ]; 53 24 mainProgram = "hamrs"; 54 - sourceProvenance = [ sourceTypes.binaryNativeCode ]; 25 + sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; 55 26 }; 56 - } 27 + in 28 + callPackage ./linux.nix { inherit pname version meta; }