diff options
author | Michael Peyton Jones <me@michaelpj.com> | 2017-10-21 22:29:45 +0100 |
---|---|---|
committer | Michael Peyton Jones <me@michaelpj.com> | 2017-10-21 22:29:45 +0100 |
commit | 18d286b6c9fb97434e8ef1a555fdc0b646335ef6 (patch) | |
tree | 6b27668fe3feb495724f6ff3c2bc23601f4842c9 /nixos/modules | |
parent | 7f43dd3b3b944c8a236b42e87eac67aae7e62407 (diff) | |
download | nixpkgs-18d286b6c9fb97434e8ef1a555fdc0b646335ef6.tar nixpkgs-18d286b6c9fb97434e8ef1a555fdc0b646335ef6.tar.gz nixpkgs-18d286b6c9fb97434e8ef1a555fdc0b646335ef6.tar.bz2 nixpkgs-18d286b6c9fb97434e8ef1a555fdc0b646335ef6.tar.lz nixpkgs-18d286b6c9fb97434e8ef1a555fdc0b646335ef6.tar.xz nixpkgs-18d286b6c9fb97434e8ef1a555fdc0b646335ef6.tar.zst nixpkgs-18d286b6c9fb97434e8ef1a555fdc0b646335ef6.zip |
plymouth: try to remove more references in themes
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/system/boot/plymouth.nix | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/plymouth.nix b/nixos/modules/system/boot/plymouth.nix index d45b1686c1e..595cb1a4f00 100644 --- a/nixos/modules/system/boot/plymouth.nix +++ b/nixos/modules/system/boot/plymouth.nix @@ -97,12 +97,26 @@ in moduleName="$(sed -n 's,ModuleName *= *,,p' ${themesEnv}/share/plymouth/themes/${cfg.theme}/${cfg.theme}.plymouth)" mkdir -p $out/lib/plymouth/renderers - cp ${plymouth}/lib/plymouth/{text,details,$moduleName}.so $out/lib/plymouth + # module might come from a theme + cp ${themesEnv}/lib/plymouth/{text,details,$moduleName}.so $out/lib/plymouth cp ${plymouth}/lib/plymouth/renderers/{drm,frame-buffer}.so $out/lib/plymouth/renderers mkdir -p $out/share/plymouth/themes cp ${plymouth}/share/plymouth/plymouthd.defaults $out/share/plymouth - cp -r ${themesEnv}/share/plymouth/themes/{text,details,${cfg.theme}} $out/share/plymouth/themes + + # copy themes into working directory for patching + mkdir themes + # use -L to copy the directories proper, not the symlinks to them + cp -r -L ${themesEnv}/share/plymouth/themes/{text,details,${cfg.theme}} themes + + # patch out any attempted references to the theme or plymouth's themes directory + chmod -R +w themes + find themes -type f | while read file + do + sed -i "s,/nix/.*/share/plymouth/themes,$out/share/plymouth/themes,g" $file + done + + cp -r themes/* $out/share/plymouth/themes cp ${cfg.logo} $out/share/plymouth/logo.png ''; |