packages/amberol: init sandboxed at 0.8.1

This commit is contained in:
Max Headroom 2022-07-01 21:45:13 +02:00
parent c5d5c2c91a
commit d57d54d271
3 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,17 @@
{ amberol, fetchFromGitLab, rustPlatform }:
amberol.overrideAttrs (_: rec {
version = "0.8.1";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "World";
repo = "amberol";
rev = version;
hash = "sha256-27jXpx79JNF5FjVKERNrQFS7VHZHWh57jjBWvX5IRio=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "amberol-${version}";
hash = "sha256-M5T+imP7up3RRiXOJRrqimcjs8r81V5jfQMjR02skko=";
};
})

View file

@ -0,0 +1,44 @@
{ mkNixPak, callPackage, lib, gnome }:
mkNixPak {
config = {
dbus.policies = {
"org.freedesktop.DBus" = "talk";
"org.gtk.vfs.*" = "talk";
"org.gtk.vfs" = "talk";
"io.bassi.Amberol" = "own";
"org.mpris.MediaPlayer2.*" = "own";
"org.freedesktop.portal.*" = "talk";
"ca.desrt.dconf" = "talk";
};
bubblewrap = {
network = false;
bind.rw = [
"$HOME/.cache/amberol"
"$HOME/.cache/fontconfig"
"$XDG_RUNTIME_DIR/gvfsd"
"$XDG_RUNTIME_DIR/pulse"
"$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY"
];
bind.ro = [
"/etc/fonts"
"$HOME/Music"
"/srv/data/MUSIC"
"$XDG_RUNTIME_DIR/doc"
"/run/opengl-driver"
"/sys/dev/char"
"/sys/devices/pci0000:00"
];
bind.dev = [
"/dev/dri"
];
env = {
XDG_DATA_DIRS = lib.makeSearchPath "share" [
gnome.adwaita-icon-theme
];
GTK_USE_PORTAL = "1";
};
};
app.package = callPackage ./amberol.nix {};
};
}

View file

@ -7,8 +7,13 @@ let
overridesDirs = [ "${inputs.dream2nix}/overrides" ./dream2nix/overrides ]; overridesDirs = [ "${inputs.dream2nix}/overrides" ./dream2nix/overrides ];
}; };
}; };
mkNixPak = inputs.nixpak.lib.nixpak {
inherit (pkgs) lib;
inherit pkgs;
};
in in
{ {
amberol = (pkgs.callPackage ./nixpak/amberol { inherit mkNixPak; }).config.env;
brig = pkgs.callPackage ./tools/brig { }; brig = pkgs.callPackage ./tools/brig { };
privatevoid-smart-card-ca-bundle = pkgs.callPackage ./data/privatevoid-smart-card-certificate-authority-bundle.nix { }; privatevoid-smart-card-ca-bundle = pkgs.callPackage ./data/privatevoid-smart-card-certificate-authority-bundle.nix { };