From 8be0d90992efd13b71166cd32d0fc6f10a6ed600 Mon Sep 17 00:00:00 2001 From: Hussein Ait Lahcen Date: Thu, 21 Jun 2018 10:48:03 +0200 Subject: refact: make packages function-like --- clever-tools/default.nix | 7 +------ default.nix | 4 +++- nodegit/default.nix | 14 ++++---------- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/clever-tools/default.nix b/clever-tools/default.nix index 8032014..497e911 100644 --- a/clever-tools/default.nix +++ b/clever-tools/default.nix @@ -1,14 +1,9 @@ -{ pkgs ? import {} }: - -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 { diff --git a/default.nix b/default.nix index 094b3b0..84ed9be 100644 --- a/default.nix +++ b/default.nix @@ -1,3 +1,5 @@ with import {}; -callPackage ./clever-tools {} +callPackage ./clever-tools { + nodegit = callPackage ./nodegit {}; +} diff --git a/nodegit/default.nix b/nodegit/default.nix index aee9fcf..83d734a 100644 --- a/nodegit/default.nix +++ b/nodegit/default.nix @@ -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"; -- cgit v1.2.3