nixpkgs/pkgs/applications/office/libreoffice/gen-shell.nix
Martin Milata 737ce5c848 libreoffice: factor out common derivation
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.
2019-12-18 13:23:34 +01:00

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
}
'';
}