libreoffice: add nix shells for source generation
This commit is contained in:
parent
edcaebf1d9
commit
bb8d294270
|
@ -0,0 +1,10 @@
|
||||||
|
LibreOffice
|
||||||
|
===========
|
||||||
|
|
||||||
|
To generate `libreoffice-srcs.nix`:
|
||||||
|
|
||||||
|
nix-shell default-gen-shell.nix --run generate
|
||||||
|
|
||||||
|
To generate `libreoffice-srcs-still.nix`:
|
||||||
|
|
||||||
|
nix-shell still-gen-shell.nix --run generate
|
|
@ -0,0 +1,27 @@
|
||||||
|
{ pkgs ? (import <nixpkgs> {}) }:
|
||||||
|
|
||||||
|
with pkgs;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
primary-src = callPackage ./default-primary-src.nix {};
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "generate-libreoffice-srcs-shell";
|
||||||
|
|
||||||
|
buildCommand = "exit 1";
|
||||||
|
|
||||||
|
downloadList = stdenv.mkDerivation {
|
||||||
|
name = "libreoffice-${primary-src.version}-download-list";
|
||||||
|
inherit (primary-src) src version;
|
||||||
|
builder = ./download-list-builder.sh;
|
||||||
|
};
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
function generate {
|
||||||
|
./generate-libreoffice-srcs.sh | tee libreoffice-srcs.nix
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{ fetchurl }:
|
||||||
|
|
||||||
|
rec {
|
||||||
|
major = "5";
|
||||||
|
minor = "2";
|
||||||
|
patch = "1";
|
||||||
|
tweak = "2";
|
||||||
|
|
||||||
|
subdir = "${major}.${minor}.${patch}";
|
||||||
|
|
||||||
|
version = "${subdir}${if tweak == "" then "" else "."}${tweak}";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://download.documentfoundation.org/libreoffice/src/${subdir}/libreoffice-${version}.tar.xz";
|
||||||
|
sha256 = "14g2xwpid4vsgmc69rs7hz1wx96dfkq0cbm32vjgljsm7a19qfc1";
|
||||||
|
};
|
||||||
|
}
|
|
@ -18,15 +18,15 @@
|
||||||
, kdeIntegration ? false
|
, kdeIntegration ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
primary-src = import ./default-primary-src.nix { inherit fetchurl; };
|
||||||
|
in
|
||||||
|
|
||||||
|
with { inherit (primary-src) major minor subdir version; };
|
||||||
|
|
||||||
let
|
let
|
||||||
lib = stdenv.lib;
|
lib = stdenv.lib;
|
||||||
langsSpaces = lib.concatStringsSep " " langs;
|
langsSpaces = lib.concatStringsSep " " langs;
|
||||||
major = "5";
|
|
||||||
minor = "2";
|
|
||||||
patch = "1";
|
|
||||||
tweak = "2";
|
|
||||||
subdir = "${major}.${minor}.${patch}";
|
|
||||||
version = "${subdir}${if tweak == "" then "" else "."}${tweak}";
|
|
||||||
|
|
||||||
fetchThirdParty = {name, md5, brief, subDir ? ""}: fetchurl {
|
fetchThirdParty = {name, md5, brief, subDir ? ""}: fetchurl {
|
||||||
inherit name md5;
|
inherit name md5;
|
||||||
|
@ -64,10 +64,7 @@ let
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
name = "libreoffice-${version}";
|
name = "libreoffice-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
inherit (primary-src) src;
|
||||||
url = "http://download.documentfoundation.org/libreoffice/src/${subdir}/libreoffice-${version}.tar.xz";
|
|
||||||
sha256 = "14g2xwpid4vsgmc69rs7hz1wx96dfkq0cbm32vjgljsm7a19qfc1";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Openoffice will open libcups dynamically, so we link it directly
|
# Openoffice will open libcups dynamically, so we link it directly
|
||||||
# to make its dlopen work.
|
# to make its dlopen work.
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
source $stdenv/setup
|
||||||
|
|
||||||
|
tar --extract --file=$src libreoffice-$version/download.lst -O > $out
|
|
@ -2,10 +2,6 @@
|
||||||
|
|
||||||
# Ideally we would move as much as possible into derivation dependencies
|
# Ideally we would move as much as possible into derivation dependencies
|
||||||
|
|
||||||
# Take the list of files from the main package, ooo.lst.in
|
|
||||||
|
|
||||||
# This script wants an argument: download list file
|
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
[
|
[
|
||||||
EOF
|
EOF
|
||||||
|
@ -22,7 +18,7 @@ write_entry(){
|
||||||
}
|
}
|
||||||
|
|
||||||
saved_line=
|
saved_line=
|
||||||
cat "$(dirname "$0")/libreoffice-srcs-additions.sh" "$@" |
|
cat "$(dirname "$0")/libreoffice-srcs-additions.sh" "$downloadList" |
|
||||||
while read line; do
|
while read line; do
|
||||||
case "$line" in
|
case "$line" in
|
||||||
EVAL\ *)
|
EVAL\ *)
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
{ pkgs ? (import <nixpkgs> {}) }:
|
||||||
|
|
||||||
|
with pkgs;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
primary-src = callPackage ./still-primary-src.nix {};
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "generate-libreoffice-srcs-shell";
|
||||||
|
|
||||||
|
buildCommand = "exit 1";
|
||||||
|
|
||||||
|
downloadList = stdenv.mkDerivation {
|
||||||
|
name = "libreoffice-${primary-src.version}-download-list";
|
||||||
|
inherit (primary-src) src version;
|
||||||
|
builder = ./download-list-builder.sh;
|
||||||
|
};
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
function generate {
|
||||||
|
./generate-libreoffice-srcs.sh | tee libreoffice-srcs-still.nix
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{ fetchurl }:
|
||||||
|
|
||||||
|
rec {
|
||||||
|
major = "5";
|
||||||
|
minor = "1";
|
||||||
|
patch = "5";
|
||||||
|
tweak = "2";
|
||||||
|
|
||||||
|
subdir = "${major}.${minor}.${patch}";
|
||||||
|
|
||||||
|
version = "${subdir}${if tweak == "" then "" else "."}${tweak}";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://download.documentfoundation.org/libreoffice/src/${subdir}/libreoffice-${version}.tar.xz";
|
||||||
|
sha256 = "1qg0dj0zwh5ifhmvv4k771nmyqddz4ifn75s9mr1p0nyix8zks8x";
|
||||||
|
};
|
||||||
|
}
|
|
@ -18,15 +18,15 @@
|
||||||
, kdeIntegration ? false
|
, kdeIntegration ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
primary-src = import ./still-primary-src.nix { inherit fetchurl; };
|
||||||
|
in
|
||||||
|
|
||||||
|
with { inherit (primary-src) major minor subdir version; };
|
||||||
|
|
||||||
let
|
let
|
||||||
lib = stdenv.lib;
|
lib = stdenv.lib;
|
||||||
langsSpaces = lib.concatStringsSep " " langs;
|
langsSpaces = lib.concatStringsSep " " langs;
|
||||||
major = "5";
|
|
||||||
minor = "1";
|
|
||||||
patch = "5";
|
|
||||||
tweak = "2";
|
|
||||||
subdir = "${major}.${minor}.${patch}";
|
|
||||||
version = "${subdir}${if tweak == "" then "" else "."}${tweak}";
|
|
||||||
|
|
||||||
fetchThirdParty = {name, md5, brief, subDir ? ""}: fetchurl {
|
fetchThirdParty = {name, md5, brief, subDir ? ""}: fetchurl {
|
||||||
inherit name md5;
|
inherit name md5;
|
||||||
|
@ -64,10 +64,7 @@ let
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
name = "libreoffice-${version}";
|
name = "libreoffice-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
inherit (primary-src) src;
|
||||||
url = "http://download.documentfoundation.org/libreoffice/src/${subdir}/libreoffice-${version}.tar.xz";
|
|
||||||
sha256 = "1qg0dj0zwh5ifhmvv4k771nmyqddz4ifn75s9mr1p0nyix8zks8x";
|
|
||||||
};
|
|
||||||
|
|
||||||
# we only have this problem on i686 ATM
|
# we only have this problem on i686 ATM
|
||||||
patches = if stdenv.is64bit then null else [
|
patches = if stdenv.is64bit then null else [
|
||||||
|
|
Loading…
Reference in New Issue