Skip to content

Instantly share code, notes, and snippets.

@costrouc
Created July 17, 2019 18:12
Show Gist options
  • Save costrouc/15c68adebcfa595b280ecab1db556394 to your computer and use it in GitHub Desktop.
Save costrouc/15c68adebcfa595b280ecab1db556394 to your computer and use it in GitHub Desktop.
Typical shell recipe
{ pkgs ? import <nixpkgs> { }, pythonPackages ? pkgs.python3Packages }:
let
pkgs = import (builtins.fetchTarball {
url = "https://github.com/costrouc/nixpkgs/archive/46976eff15c48713f2aa99bdbafa8229cb031262.tar.gz";
sha256 = "1q32jjv87n4dqchi00bj11bmy99pp72qdy3wy4c4fqxxchh63y38";
}) { };
pythonPackages = pkgs.python3Packages;
myNumpy = pythonPackages.numpy.overrideAttrs(numpy.overrideAttrs (oldAttrs: {
name = "${oldAttrs.pname}-master";
buildInputs = oldAttrs.buildInputs ++ [ super.cython ];
src = builtins.fetchTarball {
url = "https://github.com/numpy/numpy/archive/master.tar.gz";
};
});
in
pkgs.mkShell {
buildInputs = with pythonPackages; [ pkgs.sqlite datasette pytest myNumpy ];
shellHook = ''
export SQLITE_TMPDIR=/tmp
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment