Skip to content

Commit

Permalink
nix/fossbeamer: use wrapGAppsHook instead of manual wrapper in cage
Browse files Browse the repository at this point in the history
This fixes font sizes.
  • Loading branch information
Kranzes committed Jul 19, 2024
1 parent bf062c7 commit c27e501
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 59 deletions.
26 changes: 13 additions & 13 deletions nix/default.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
{ system ? builtins.currentSystem
, nixpkgs ? (import ./sources.nix { inherit system; }).nixpkgs
, overlays ? [
(_: pkgs: {
fossbeamer = pkgs.callPackage ./fossbeamer.nix { };
})
]
, pkgs ? import nixpkgs {
inherit system overlays;
}
, pkgsAArch64 ? import nixpkgs {
localSystem = system;
crossSystem = "aarch64-linux";
inherit overlays;
}
}:

let
pkgs = import nixpkgs {
inherit system;
overlays = [ (import ./overlay.nix) ];
};

# All libraries we need to link against during an imperative `cargo build`.
# Used to assemble `PKG_CONFIG_PATH`.
rust_sys_dep_libs = with pkgs; [
Expand All @@ -26,16 +33,9 @@ let
++ gtk3.buildInputs
++ pango.buildInputs;

pkgsAArch64 = import nixpkgs {
localSystem = system;
crossSystem = "aarch64-linux";
overlays = [ (import ./overlay.nix) ];
};

machine-generic = (pkgsAArch64.nixos ./configuration.nix);
machine-cm3 = (pkgsAArch64.nixos ./configuration-cm3.nix);
vm = (pkgs.nixos ./configuration.nix).vm;

in
rec {
inherit pkgs;
Expand Down
36 changes: 36 additions & 0 deletions nix/fossbeamer.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{ callPackage
, defaultCrateOverrides
, lib
, wrapGAppsHook3
, glib-networking
, gst_all_1
}:
(callPackage ../Cargo.nix {
defaultCrateOverrides = defaultCrateOverrides // {
fossbeamer = prev: {
src = lib.fileset.toSource rec {
root = prev.src.origSrc;
fileset = (lib.fileset.intersection
(lib.fileset.fromSource root) # We build our final fileset from the original src
(lib.fileset.fileFilter (f: f.hasExt "rs") root)
);
};

nativeBuildInputs = [
wrapGAppsHook3
];

buildInputs = with gst_all_1; [
glib-networking
] ++ (with gst_all_1; [
gstreamer
gst-plugins-base
gst-plugins-good
gst-plugins-bad
gst-libav
]);
};
};
}).rootCrate.build.override {
runTests = true;
}
38 changes: 0 additions & 38 deletions nix/overlay.nix

This file was deleted.

8 changes: 0 additions & 8 deletions nix/profiles/kiosk.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@
${pkgs.fossbeamer}/bin/fossbeamer --default-config=${../../default-config.json} https://wip.bar
'';
environment = {
GST_PLUGIN_SYSTEM_PATH_1_0 = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" (with pkgs.gst_all_1;[
gstreamer
gst-plugins-base
gst-plugins-good
gst-plugins-bad
gst-libav
]);
GIO_MODULE_DIR = "${pkgs.glib-networking}/lib/gio/modules/";
LIBGL_DEBUG = "verbose";
RUST_LOG = "debug";
};
Expand Down

0 comments on commit c27e501

Please sign in to comment.