citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

requirements.nix (1328B)


      1 # generated using pypi2nix tool (version: 1.3.0dev)
      2 # See more at: https://github.com/garbas/pypi2nix
      3 #
      4 # COMMAND:
      5 #   pypi2nix -V 2.7 -r requirements.txt -E stdenv -E sqlite
      6 #
      7 
      8 { pkgs ? import <nixpkgs> {}
      9 }:
     10 
     11 let
     12 
     13   inherit (pkgs.stdenv.lib) fix' extends inNixShell;
     14 
     15   pythonPackages = pkgs.python27Packages;
     16   commonBuildInputs = with pkgs; [ sqlite ];
     17   commonDoCheck = false;
     18 
     19   buildEnv = { pkgs ? {}, modules ? {} }:
     20     let
     21       interpreter = pythonPackages.python.buildEnv.override {
     22         extraLibs = (builtins.attrValues pkgs) ++ (builtins.attrValues modules);
     23       };
     24     in {
     25       mkDerivation = pythonPackages.buildPythonPackage;
     26       interpreter = if inNixShell then interpreter.env else interpreter;
     27       overrideDerivation = drv: f: pythonPackages.buildPythonPackage (drv.drvAttrs // f drv.drvAttrs);
     28       pkgs_top_level = builtins.filter (x: !(builtins.hasAttr "top_level" x.passthru)) (
     29           builtins.attrValues (builtins.removeAttrs pkgs ["__unfix__"]));
     30       inherit buildEnv pkgs modules;
     31     };
     32 
     33   python = buildEnv {};
     34   generated = import ./requirements_generated.nix { inherit pkgs python commonBuildInputs commonDoCheck; };
     35   overrides = import ./requirements_override.nix { inherit pkgs python; };
     36 
     37   python' = buildEnv {
     38     pkgs = fix' (extends overrides generated);
     39   };
     40 
     41 in python'