6 # Add packages to a Python environment. Works if you pass something like either
8 # b) python3.withPackages (ps: [...])
9 # See https://github.com/NixOS/nixpkgs/pull/97467#issuecomment-689315186
10 addPackagesToPython = python: packages:
11 if python ? "env" then python.override (old: {
12 extraLibs = old.extraLibs ++ packages;
14 else python.withPackages (ps: packages);
16 # Convert an ordinary source checkout into a repo with a single commit
17 repoifySimple = name: path:
18 runCommand ''${name}-repoified'' {buildInputs = [git];} ''
26 git config user.email "julia2nix@localhost"
27 git config user.name "julia2nix"
28 git commit -m "Dummy commit"
31 # Convert an dependency source info into a repo with a single commit
32 repoifyInfo = uuid: info:
33 runCommand ''julia-${info.name}-${info.version}'' {buildInputs = [git];} ''
35 cp -r ${info.src}/. $out
41 git config user.email "julia2nix@localhost"
42 git config user.name "julia2nix"
43 git commit -m "Dummy commit"