Skip to content

Instantly share code, notes, and snippets.

@ja0nz
Last active October 14, 2020 09:50
Show Gist options
  • Save ja0nz/4fcc5547b42383d832d260fdfb63efa3 to your computer and use it in GitHub Desktop.
Save ja0nz/4fcc5547b42383d832d260fdfb63efa3 to your computer and use it in GitHub Desktop.
Nix/NixOS ♥ Sizzy Dev Browser (https://sizzy.co/)
/*
Unfortunately, the Sizzy AppImage is somewhat closed source and has no permalink.
Therefore it can't be added to any package manager.
To install it with the Nix package manager follow the steps:
- mkdir sizzy && touch sizzy/default.nix
- cp Sizzy-<version>.AppImage sizzy
- echo <content of this file> > sizzy/default.nix
- nix-env -if sizzy/default.nix
-> sizzy should be on path and callable
*/
#{ appimageTools, lib }:
let
# To be removed if committed one day to nixpkgs
pkgs = import <nixpkgs> {};
appimageTools = pkgs.appimageTools;
lib = pkgs.lib;
# END to be remove
pname = "sizzy";
version = "0.38.0"; # <= Adapt version to yours
name = "${pname}-${version}";
src = ./. + "/Sizzy-${version}.AppImage";
appimageContents = appimageTools.extractType2 { inherit name src; };
in
appimageTools.wrapType2 {
inherit name src;
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
install -m 444 -D \
${appimageContents}/${pname}.desktop \
$out/share/applications/${pname}.desktop
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
cp -r ${appimageContents}/usr/share/icons $out/share
'';
meta = with lib; {
description = "The browser for Developers & Designers";
homepage = "https://www.sizzy.co/";
#license = with licenses; [ unfree ];
#maintainers = with maintainers; [ ja0nz ];
platforms = [ "x86_64-linux" ];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment