Skip to main content

Abuses Nix philosophy, allowing me to do `from nixpkgs import scipy` anytime

Project description

# nixpkgs-python-importer

## What

An importlib hack that allows from nixpkgs import somepackage.

Examples:

import nixpkgs.scipy from nixpkgs import scipy from nixpkgs.matplotlib import pyplot as plt import nixpkgs.matplotlib.pyplot as plt

## Why

I am a researcher and I uses python and xonsh interactively a lot. While I appreciate the purity of Nix, sometimes I really want to violate it and pull in some dependency into my shell right now, without tearing my session down, editing and rebuilding an environment, and then recreating my session from history.

A convenient way of spawning a xonsh instant with an extra dependency soothes the nerves a bit, but doesn’t really free me from the recreation part.

I started writing a xonsh macro that ended up being a generic Python solution with a pleasingly nice syntax. I mean, from nixpkgs import scipy. Ain’t that nice?

## How

importlib magic

## Try

TODO

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nixpkgs-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file nixpkgs-0.1.0.tar.gz.

File metadata

  • Download URL: nixpkgs-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.3.2 requests/2.18.4 setuptools/38.4.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.6

File hashes

Hashes for nixpkgs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7e5341741b96a03077b927ac9ffbe328b84f47aa25b83dcdff8b9d56023c0e81
MD5 08b9ddaa39884cde014f83d2164e735f
BLAKE2b-256 56e370e8413041184883a080f11e19220c5bc551982a8bba6e9e61d74c90d271

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page