diff options
author | Hussein Ait Lahcen <hussein.aitlahcen@gmail.com> | 2018-06-21 10:48:03 +0200 |
---|---|---|
committer | Hussein Ait Lahcen <hussein.aitlahcen@gmail.com> | 2018-06-21 10:48:03 +0200 |
commit | 8be0d90992efd13b71166cd32d0fc6f10a6ed600 (patch) | |
tree | 8c1fb442e3f470346ecd8fafc4962c4f6dc573bb | |
parent | 96ea4f91951010ef9c560c13122a6f8ebfac2816 (diff) | |
download | clever-tools-nix-8be0d90992efd13b71166cd32d0fc6f10a6ed600.tar.gz clever-tools-nix-8be0d90992efd13b71166cd32d0fc6f10a6ed600.tar.zst clever-tools-nix-8be0d90992efd13b71166cd32d0fc6f10a6ed600.zip |
refact: make packages function-like
-rw-r--r-- | clever-tools/default.nix | 7 | ||||
-rw-r--r-- | default.nix | 4 | ||||
-rw-r--r-- | 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 @@ | |||
1 | { pkgs ? import <nixpkgs> {} }: | 1 | { stdenv, fetchurl, glibc, nodegit }: |
2 | |||
3 | with pkgs; | ||
4 | 2 | ||
5 | let | 3 | let |
6 | version = "0.9.3"; | 4 | version = "0.9.3"; |
7 | 5 | ||
8 | nodegit = import ../nodegit/default.nix { inherit pkgs; }; | ||
9 | |||
10 | libs = [ stdenv.cc.cc glibc ]; | 6 | libs = [ stdenv.cc.cc glibc ]; |
11 | |||
12 | in | 7 | in |
13 | 8 | ||
14 | stdenv.mkDerivation { | 9 | stdenv.mkDerivation { |
diff --git a/default.nix b/default.nix index 094b3b0..84ed9be 100644 --- a/default.nix +++ b/default.nix | |||
@@ -1,3 +1,5 @@ | |||
1 | with import <nixpkgs> {}; | 1 | with import <nixpkgs> {}; |
2 | 2 | ||
3 | callPackage ./clever-tools {} | 3 | callPackage ./clever-tools { |
4 | nodegit = callPackage ./nodegit {}; | ||
5 | } | ||
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 @@ | |||
1 | { pkgs }: | 1 | { stdenv, fetchurl, curl, glibc, openssl }: |
2 | 2 | ||
3 | let | 3 | let |
4 | version = "0.20.3"; | 4 | version = "0.20.3"; |
5 | 5 | ||
6 | stdenv = pkgs.stdenv; | 6 | curlWithGnutls = curl.override { |
7 | fetchurl = pkgs.fetchurl; | ||
8 | |||
9 | curl = pkgs.curl.override { | ||
10 | sslSupport = false; | 7 | sslSupport = false; |
11 | gnutlsSupport = true; | 8 | gnutlsSupport = true; |
12 | }; | 9 | }; |
13 | glibc = pkgs.glibc; | ||
14 | openssl = pkgs.openssl; | ||
15 | |||
16 | libs = [ stdenv.cc.cc curl glibc openssl ]; | ||
17 | 10 | ||
11 | libs = [ stdenv.cc.cc curlWithGnutls glibc openssl ]; | ||
18 | in | 12 | in |
19 | 13 | ||
20 | assert pkgs.stdenv.system == "x86_64-linux"; | 14 | assert stdenv.system == "x86_64-linux"; |
21 | 15 | ||
22 | stdenv.mkDerivation { | 16 | stdenv.mkDerivation { |
23 | name = "nodegit-${version}-node-v51"; | 17 | name = "nodegit-${version}-node-v51"; |