git.iko.soy/typeable/nixpkgs
on master help sign in
Improve LibreOffice src list generation
commite32172612a83e889045004e7cd9c61394e879acd authorMichael Raskin <7c6f434c@mail.ru> dateThu 21 Jan 2016, 17:16 (11 years ago) parentf727f81
3 files changed+14
pkgs/applications/office/libreoffice/generate-libreoffice-srcs.sh+12 pkgs/applications/office/libreoffice/libreoffice-srcs-additions.sh+1 pkgs/applications/office/libreoffice/libreoffice-srcs.nix+1
pkgs/applications/office/libreoffice/generate-libreoffice-srcs.sh+12
@@ -1,7 +1,11 @@
11#!/run/current-system/sw/bin/bash
22
3+# Ideally we would move as much as possible into derivation dependencies
4+
35# Take the list of files from the main package, ooo.lst.in
46
7+# This script wants an argument: download list file
8+
59cat <<EOF
610[
711EOF
@@ -11,11 +15,18 @@ write_entry(){
1115 echo " name = \"${name}\";"
1216 echo " md5 = \"${md5}\";"
1317 echo " brief = ${brief};"
18+ eval "echo -n \"\$additions_${name%%[-_.]*}\""
19+ eval "test -n \"\$additions_${name%%[-_.]*}\" && echo"
1420 echo '}'
1521}
1622
23+cat "$(dirname "$0")/libreoffice-srcs-additions.sh" "$@" |
1724while read line; do
1825 case "$line" in
26+ EVAL\ *)
27+ echo "${line#* }" >&2;
28+ eval "${line#* }";
29+ ;;
1930 \#*)
2031 echo Skipping comment: "$line" >&2;
2132 ;;
@@ -42,6 +53,7 @@ while read line; do
4253 line="${line#,}"
4354 md5=${line:0:32};
4455 name=${line:33};
56+ name="${name%)}"
4557 brief=false;
4658 write_entry;
4759 ;;
pkgs/applications/office/libreoffice/libreoffice-srcs-additions.shnew file+1
@@ -0,0 +1 @@
1+EVAL additions_libgltf=' subDir = "libgltf";'
pkgs/applications/office/libreoffice/libreoffice-srcs.nix+1
@@ -323,6 +323,7 @@
323323 name = "libgltf-0.0.2.tar.bz2";
324324 md5 = "d63a9f47ab048f5009d90693d6aa6424";
325325 brief = true;
326+ subDir = "libgltf";
326327}
327328{
328329 name = "liblangtag-0.5.1.tar.bz2";