Skip to content

Commit

Permalink
Merge pull request #34 from Kranzes/expr-cleanup
Browse files Browse the repository at this point in the history
nix/fossbeamer: cleanup expression and use wrapGAppsHook3
  • Loading branch information
flokli authored Jul 19, 2024
2 parents 98fe5bb + c670f06 commit 2254de0
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 62 deletions.
14 changes: 9 additions & 5 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
}:

let
overlays = [
(_: pkgs: {
fossbeamer = pkgs.callPackage ./fossbeamer.nix { };
})
];

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

# All libraries we need to link against during an imperative `cargo build`.
Expand All @@ -29,16 +34,15 @@ let
pkgsAArch64 = import nixpkgs {
localSystem = system;
crossSystem = "aarch64-linux";
overlays = [ (import ./overlay.nix) ];
inherit overlays;
};

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

in
rec {
inherit pkgs;
inherit pkgs pkgsAArch64;
inherit (pkgs) fossbeamer;

profileEnv = pkgs.writeTextFile {
Expand Down
12 changes: 1 addition & 11 deletions nix/deployment.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
let
nixpkgs = (import ./sources.nix { inherit system; }).nixpkgs;
system = builtins.currentSystem;
pkgs = import nixpkgs {
inherit system;
overlays = [ (import ./overlay.nix) ];
};
pkgsAArch64 = import nixpkgs {
localSystem = system;
crossSystem = "aarch64-linux";
overlays = [ (import ./overlay.nix) ];
};
inherit (import ./. { }) pkgs pkgsAArch64;

common = {
# https://github.com/DBCDK/morph/issues/106
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 2254de0

Please sign in to comment.