mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 19:45:54 +00:00
737ce5c848
Each "variant" of libreoffice gets its own subdirectory src-$variant where files w/ source references are stored. In the directory is also override.nix which allows you to override derivation attributes in addition to source files.
30 lines
589 B
Nix
30 lines
589 B
Nix
{ pkgs ? (import <nixpkgs> {}), variant }:
|
|
|
|
with pkgs;
|
|
|
|
let
|
|
|
|
primary-src = callPackage (./. + "/src-${variant}/primary.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;
|
|
};
|
|
|
|
buildInputs = [ python3 ];
|
|
|
|
shellHook = ''
|
|
function generate {
|
|
python3 generate-libreoffice-srcs.py ${variant} > src-${variant}/download.nix
|
|
}
|
|
'';
|
|
}
|