diff --git a/packages/nixpak/amberol/amberol.nix b/packages/nixpak/amberol/amberol.nix new file mode 100644 index 0000000..d9f10c2 --- /dev/null +++ b/packages/nixpak/amberol/amberol.nix @@ -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="; + }; +}) diff --git a/packages/nixpak/amberol/default.nix b/packages/nixpak/amberol/default.nix new file mode 100644 index 0000000..e53327d --- /dev/null +++ b/packages/nixpak/amberol/default.nix @@ -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 {}; + }; +} \ No newline at end of file diff --git a/packages/packages.nix b/packages/packages.nix index 60a1c7d..1796a2b 100644 --- a/packages/packages.nix +++ b/packages/packages.nix @@ -7,8 +7,13 @@ let overridesDirs = [ "${inputs.dream2nix}/overrides" ./dream2nix/overrides ]; }; }; + mkNixPak = inputs.nixpak.lib.nixpak { + inherit (pkgs) lib; + inherit pkgs; + }; in { + amberol = (pkgs.callPackage ./nixpak/amberol { inherit mkNixPak; }).config.env; brig = pkgs.callPackage ./tools/brig { }; privatevoid-smart-card-ca-bundle = pkgs.callPackage ./data/privatevoid-smart-card-certificate-authority-bundle.nix { };