5 , writeShellApplication
7 , common-updater-scripts
10 stdenvNoCC.mkDerivation (finalAttrs: {
11 pname = "arc-browser";
12 version = "1.52.0-51895";
15 url = "https://releases.arc.net/release/Arc-${finalAttrs.version}.dmg";
16 hash = "sha256-IGUrU6J7xI0ay/ZQaC6xaI+Tl7ateAVOpGxtmR0yGIA=";
19 nativeBuildInputs = [ undmg ];
21 sourceRoot = "Arc.app";
26 mkdir -p $out/Applications/Arc.app
27 cp -R . $out/Applications/Arc.app
34 passthru.updateScript = lib.getExe (writeShellApplication {
35 name = "arc-browser-update-script";
36 runtimeInputs = [ curl common-updater-scripts ];
39 redirect_url="$(curl -s -L -f "https://releases.arc.net/release/Arc-latest.dmg" -o /dev/null -w '%{url_effective}')"
40 # The url scheme is: https://releases.arc.net/release/Arc-1.23.4-56789.dmg
41 # We strip everything before 'Arc-' and after '.dmg'
42 version="''${redirect_url##*/Arc-}"
43 version="''${version%.dmg}"
44 update-source-version arc-browser "$version" --file=./pkgs/by-name/ar/arc-browser/package.nix
49 description = "Arc from The Browser Company";
50 homepage = "https://arc.net/";
51 license = lib.licenses.unfree;
52 maintainers = with lib.maintainers; [ donteatoreo ];
53 platforms = [ "aarch64-darwin" "x86_64-darwin" ];
54 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];