about summary refs log tree commit diff
path: root/pkgs/development/julia-modules/tests/top-julia-packages.nix
blob: ca93f42875b3336b5da53bd23c2b9dce3eac2265 (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
with import ../../../../. {};

let
  package-requests = stdenv.mkDerivation {
    name = "julia-package-requests.csv";

    __impure = true;

    buildInputs = [cacert gzip wget];

    buildCommand = ''
      wget https://julialang-logs.s3.amazonaws.com/public_outputs/current/package_requests.csv.gz
      gunzip package_requests.csv.gz
      ls -lh
      cp package_requests.csv $out
    '';
  };

  registry = callPackage ../registry.nix {};

in

runCommand "top-julia-packages.yaml" {
  __impure = true;
  nativeBuildInputs = [(python3.withPackages (ps: with ps; [pyyaml toml]))];
} ''
  python ${./process_top_n.py} ${package-requests} ${registry} > $out
''