]> git.immae.eu Git - github/fretlink/clever-tools-nix.git/commitdiff
refact: make packages function-like
authorHussein Ait Lahcen <hussein.aitlahcen@gmail.com>
Thu, 21 Jun 2018 08:48:03 +0000 (10:48 +0200)
committerHussein Ait Lahcen <hussein.aitlahcen@gmail.com>
Thu, 21 Jun 2018 08:48:03 +0000 (10:48 +0200)
clever-tools/default.nix
default.nix
nodegit/default.nix

index 80320146d5647582d6109baeab1187e90f323f2d..497e91118c96a9ba1f9b3fc7567a9e74d523c886 100644 (file)
@@ -1,14 +1,9 @@
-{ pkgs ? import <nixpkgs> {} }:
-
-with pkgs;
+{ stdenv, fetchurl, glibc, nodegit }:
 
 let
   version = "0.9.3";
 
-  nodegit = import ../nodegit/default.nix { inherit pkgs; };
-
   libs = [ stdenv.cc.cc glibc ];
-
 in
 
   stdenv.mkDerivation {
index 094b3b04a18fa1ab3a5892887cf2ea0b9c32c6b2..84ed9be6b70a4cdb98b8aa8808fadcff5b78ebb6 100644 (file)
@@ -1,3 +1,5 @@
 with import <nixpkgs> {};
 
-callPackage ./clever-tools {}
+callPackage ./clever-tools {
+  nodegit = callPackage ./nodegit {};
+}
index aee9fcf6f109513c5b87fb8347488821d5552b5a..83d734a9ab16583579e63818c59cbcc5a5e863c7 100644 (file)
@@ -1,23 +1,17 @@
-{ pkgs }:
+{ stdenv, fetchurl, curl, glibc, openssl }:
 
 let
   version = "0.20.3";
 
-  stdenv = pkgs.stdenv;
-  fetchurl = pkgs.fetchurl;
-
-  curl = pkgs.curl.override {
+  curlWithGnutls = curl.override {
     sslSupport = false;
     gnutlsSupport = true;
   };
-  glibc = pkgs.glibc;
-  openssl = pkgs.openssl;
-
-  libs = [ stdenv.cc.cc curl glibc openssl ];
 
+  libs = [ stdenv.cc.cc curlWithGnutls glibc openssl ];
 in
 
-  assert pkgs.stdenv.system == "x86_64-linux";
+  assert stdenv.system == "x86_64-linux";
 
   stdenv.mkDerivation {
     name = "nodegit-${version}-node-v51";