devede: make various improvements to the derivation (#521088)
This commit is contained in:
@@ -11,6 +11,13 @@
|
||||
wrapGAppsHook3,
|
||||
gdk-pixbuf,
|
||||
gobject-introspection,
|
||||
# The subtitle encoder and mixer 'spumux' looks for the font 'arial' by default (hardcoded in devede)
|
||||
# and it should be made available to that program in the user environment or it throws an error.
|
||||
# If overrideFont is true we instead use a particular font file in the nix store,
|
||||
# which is always available by design.
|
||||
overrideFont ? true,
|
||||
liberation_ttf,
|
||||
fontPath ? "${liberation_ttf}/share/fonts/truetype/LiberationSans-Regular.ttf",
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -33,7 +40,7 @@ buildPythonApplication (finalAttrs: {
|
||||
src = fetchFromGitLab {
|
||||
owner = "rastersoft";
|
||||
repo = "devedeng";
|
||||
rev = finalAttrs.version;
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-81H063PpBF/+JDsRgBLwfAevb11yNkDtH4KdtOAL/Fg=";
|
||||
};
|
||||
|
||||
@@ -63,16 +70,27 @@ buildPythonApplication (finalAttrs: {
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py --replace "'/usr'," ""
|
||||
substituteInPlace src/devedeng/configuration_data.py \
|
||||
--replace "/usr/share" "$out/share" \
|
||||
--replace "/usr/local/share" "$out/share"
|
||||
--replace-fail "/usr/share" "$out/share" \
|
||||
--replace-fail "/usr/local/share" "$out/share"
|
||||
''
|
||||
+ lib.optionalString overrideFont ''
|
||||
substituteInPlace src/devedeng/subtitles_mux.py \
|
||||
--replace-fail arial ${fontPath}
|
||||
'';
|
||||
|
||||
# Prevent double wrapping, let the Python wrapper use the args in preFixup.
|
||||
dontWrapGApps = true;
|
||||
|
||||
preFixup = ''
|
||||
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = {
|
||||
description = "DVD Creator for Linux";
|
||||
mainProgram = "devede_ng";
|
||||
homepage = "https://www.rastersoft.com/programas/devede.html";
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = [
|
||||
|
||||
Reference in New Issue
Block a user