+20
pkgs/development/compilers/julia/default.nix
+20
pkgs/development/compilers/julia/default.nix
···
+193
pkgs/development/julia-modules/default.nix
+193
pkgs/development/julia-modules/default.nix
···+extraPythonPackages = ((callPackage ./extra-python-packages.nix { inherit python3; }).getExtraPythonPackages packageNames);+else util.addPackagesToPython python3 (map (pkg: lib.getAttr pkg python3.pkgs) extraPythonPackages));+juliaWrapped = runCommand "julia-${julia.version}-wrapped" { buildInputs = [makeWrapper]; inherit makeWrapperArgs; } ''+# Generate a Nix file consisting of a map from dependency UUID --> package info with fetchgit call:+dependencies = runCommand "julia-sources.nix" { buildInputs = [(python3.withPackages (ps: with ps; [toml pyyaml])) git]; } ''+if lib.hasAttr info.name packageOverrides then (info // { src = lib.getAttr info.name packageOverrides; }) else info;+dependencyUuidToRepo = lib.mapAttrs util.repoifyInfo (lib.mapAttrs fillInOverrideSrc dependencyUuidToInfo);+# Given the augmented registry, closure info yaml, and dependency path yaml, construct a complete+if lib.hasAttr info.name packageOverridesRepoified then (info // { src = lib.getAttr info.name packageOverridesRepoified; }) else info;+overridesOnly = lib.mapAttrs fillInOverrideSrc' (lib.filterAttrs (uuid: info: info.src == null) dependencyUuidToInfo);+minimalRegistry = runCommand "minimal-julia-registry" { buildInputs = [(python3.withPackages (ps: with ps; [toml pyyaml])) git]; } ''+# Next, deal with artifacts. Scan each artifacts file individually and generate a Nix file that+artifactsNix = runCommand "julia-artifacts.nix" { buildInputs = [(python3.withPackages (ps: with ps; [toml pyyaml]))]; } ''+"${if lib.versionAtLeast julia.version "1.7" then ./extract_artifacts.jl else ./extract_artifacts_16.jl}" \+overridesToml = runCommand "Overrides.toml" { buildInputs = [(python3.withPackages (ps: with ps; [toml]))]; } ''+# depot contains package build products (including the precompiled libraries, if precompile=true)+# Expose the steps we used along the way in case the user wants to use them, for example to build
+85
pkgs/development/julia-modules/depot.nix
+85
pkgs/development/julia-modules/depot.nix
···+nativeBuildInputs = [curl git julia (python3.withPackages (ps: with ps; [pyyaml]))] ++ extraLibs;+python ${./python}/find_package_implications.py "${closureYaml}" '${lib.generators.toJSON {} packageImplications}' extra_package_names.txt
+15
pkgs/development/julia-modules/extra-libs.nix
+15
pkgs/development/julia-modules/extra-libs.nix
···
+22
pkgs/development/julia-modules/extra-python-packages.nix
+22
pkgs/development/julia-modules/extra-python-packages.nix
···+# This file contains an extra mapping from Julia packages to the Python packages they depend on.
+63
pkgs/development/julia-modules/extract_artifacts.jl
+63
pkgs/development/julia-modules/extract_artifacts.jl
···+import Pkg.Artifacts: artifact_meta, artifact_names, find_artifacts_toml, load_artifacts_toml, select_downloadable_artifacts+# Using collect_artifacts (from Pkg.jl) is more reliable than calling select_downloadable_artifacts directly.+# collect_artifacts includes support for .pkg/select_artifacts.jl, which may produce different results.+# If we use select_downloadable_artifacts here, then at depot build time it may try to download a different artifact+# However! The collect_artifacts from Pkg.jl doesn't allow us to pass lazy to select_downloadable_artifacts.+# If there is a dynamic artifact selector, run that in an appropriate sandbox to select artifacts+select_cmd = Cmd(`$(gen_build_code(selector_path; inherit_project=true)) --startup-file=no $(triplet(platform))`)
+33
pkgs/development/julia-modules/extract_artifacts_16.jl
+33
pkgs/development/julia-modules/extract_artifacts_16.jl
···
+180
pkgs/development/julia-modules/package-closure.nix
+180
pkgs/development/julia-modules/package-closure.nix
···+import Pkg.Types: Context!, PRESERVE_NONE, manifest_info, project_deps_resolve!, registry_resolve!, stdlib_resolve!, ensure_resolved+import Pkg.Types: PRESERVE_NONE, project_deps_resolve!, registry_resolve!, stdlib_resolve!, ensure_resolved+# The handle_package_input! call above clears pkg.path, so we have to apply package overrides after+overrides = Dict{String, String}(${builtins.concatStringsSep ", " (lib.mapAttrsToList (name: path: ''"${name}" => "${path}"'') packageOverrides)})+pkgs, deps_map = _resolve(ctx.io, ctx.env, ctx.registries, pkgs, PRESERVE_NONE, ctx.julia_version)+# If we have nontrivial weak dependencies, add each one to the initial pkgs and then re-run _resolve+pkgs, deps_map = _resolve(ctx.io, ctx.env, ctx.registries, orig_pkgs, PRESERVE_NONE, ctx.julia_version)+runCommand "julia-package-closure.yml" { buildInputs = [julia (python3.withPackages (ps: with ps; [pyyaml]))]; } ''+python ${./python}/find_package_implications.py "$out" '${lib.generators.toJSON {} packageImplications}' extra_package_names.txt
+59
pkgs/development/julia-modules/python/dag.py
+59
pkgs/development/julia-modules/python/dag.py
···
+14
pkgs/development/julia-modules/python/dedup_overrides.py
+14
pkgs/development/julia-modules/python/dedup_overrides.py
···
+99
pkgs/development/julia-modules/python/extract_artifacts.py
+99
pkgs/development/julia-modules/python/extract_artifacts.py
···+artifacts = toml.loads(subprocess.check_output([julia_path, extract_artifacts_script, uuid, src]).decode())+depends_on = set(closure_dependencies_dag.get_dependencies(uuid)).intersection(dependency_uuids)+patchelf --set-rpath \$ORIGIN:\$ORIGIN/../lib:${{lib.makeLibraryPath (["$out" glibc] ++ libs ++ (with pkgs; [{" ".join(other_libs)}]))}} {{}} \;
+24
pkgs/development/julia-modules/python/find_package_implications.py
+24
pkgs/development/julia-modules/python/find_package_implications.py
···
+22
pkgs/development/julia-modules/python/format_overrides.py
+22
pkgs/development/julia-modules/python/format_overrides.py
···
+98
pkgs/development/julia-modules/python/minimal_registry.py
+98
pkgs/development/julia-modules/python/minimal_registry.py
···+registry["packages"] = {k: v for k, v in registry["packages"].items() if k in uuid_to_versions}
+67
pkgs/development/julia-modules/python/sources_nix.py
+67
pkgs/development/julia-modules/python/sources_nix.py
···
+12
pkgs/development/julia-modules/python/util.py
+12
pkgs/development/julia-modules/python/util.py
···+subprocess.check_output(["git", "config", "--global", "--add", "safe.directory", repo], env=env_with_home)+lines = subprocess.check_output(["git", "log", "--pretty=raw"], cwd=repo, env=env_with_home).decode().split("\n")
+9
pkgs/development/julia-modules/registry.nix
+9
pkgs/development/julia-modules/registry.nix
+45
pkgs/development/julia-modules/util.nix
+45
pkgs/development/julia-modules/util.nix
···
+7
-7
pkgs/top-level/all-packages.nix
+7
-7
pkgs/top-level/all-packages.nix
···