Advertisement
Guest User

Untitled

a guest
Dec 12th, 2018
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. # ~/nix-expressions/nixpkgs has a clone from nixpkgs github
  2. { pkgs ? (import /home/lfish/nix-expressions/nixpkgs {} ) }:
  3.  
  4. with pkgs;
  5. let
  6. wrapped-opencv = python-packages: with python-packages;
  7. toPythonModule (opencv3.override {
  8. enablePython = true;
  9. pythonPackages = python-packages;
  10. });
  11. my-python-packages = python-packages: with python-packages; [
  12. requests
  13. imutils
  14. numpy
  15. scipy
  16. matplotlib
  17. pyserial
  18. flask
  19. (wrapped-opencv python-packages)
  20. virtualenvwrapper
  21. ];
  22. python-with-my-packages = python35.withPackages my-python-packages;
  23. in stdenv.mkDerivation rec {
  24. name = "env";
  25.  
  26. # Mandatory boilerplate for buildable env
  27. env = buildEnv { name = name; paths = buildInputs; };
  28. builder = builtins.toFile "builder.sh" ''
  29. source $stdenv/setup; ln -s $env $out
  30. '';
  31.  
  32. # Customizable development requirements
  33. buildInputs = [
  34. python-with-my-packages
  35. #my emacs configuration
  36. (import /home/lfish/.emacs.d/emacs.nix {})
  37. ];
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement