about summary refs log tree commit diff
path: root/pkgs/applications/office/libreoffice/gen-shell.nix
blob: 7429bb0cb38281b258c3142ab60742093cba9373 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ 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
    }
  '';
}