aboutsummaryrefslogblamecommitdiff
path: root/lib/default.nix
blob: 26557ede380829f7dcb399f95722e3868c067791 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

          
     
                                  
 




                                 

                                   







                                        

                                   

                              
 




                                 

                                   




                               
      
                                                                             
{ pkgs }:
with pkgs;
rec {
  nodeEnv = import ./node-env.nix;

  fetchedGithub = path:
    let
      json = lib.importJSON path;
    in rec {
      version = json.tag;
      pname = json.meta.name;
      name = "${pname}-${version}";
      src = fetchFromGitHub json.github;
    };

  fetchedGit = path:
    let
      json = lib.importJSON path;
    in rec {
      version = json.tag;
      pname = json.meta.name;
      name = "${pname}-${version}";
      src = fetchgit json.git;
    };

  fetchedGitPrivate = path:
    let
      json = lib.importJSON path;
    in rec {
      version = json.tag;
      pname = json.meta.name;
      name = "${pname}-${version}";
      src = builtins.fetchGit {
        url = json.git.url;
        ref = "master";
        rev = json.git.rev;
      };
    };
} // (if builtins.pathExists ./private then callPackage ./private {} else {})