diff options
author | Minijackson <minijackson@riseup.net> | 2018-08-09 14:26:43 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2018-08-09 14:26:43 +0200 |
commit | f7918e6f0a9f93bd229096a76e5ed6f00e62bc41 (patch) | |
tree | 6ee38687af241b045d343da9a84f31a210c92cc3 | |
parent | 8a116e3cac9ce243e9190865fc50e677f1787637 (diff) | |
download | nix_repo-f7918e6f0a9f93bd229096a76e5ed6f00e62bc41.tar.gz nix_repo-f7918e6f0a9f93bd229096a76e5ed6f00e62bc41.zip |
Hopefully understood inputs
-rw-r--r-- | default.nix | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/default.nix b/default.nix index 423f02d..3318590 100644 --- a/default.nix +++ b/default.nix | |||
@@ -1,5 +1,5 @@ | |||
1 | { | 1 | { |
2 | nixpkgs ? import <nixpkgs> {}, | 2 | nixpkgs ? <nixpkgs>, |
3 | 3 | ||
4 | kasyncSrc ? nixpkgs.fetchgit { | 4 | kasyncSrc ? nixpkgs.fetchgit { |
5 | url = "https://anongit.kde.org/kasync.git"; | 5 | url = "https://anongit.kde.org/kasync.git"; |
@@ -31,16 +31,19 @@ | |||
31 | 31 | ||
32 | kubeSrc, | 32 | kubeSrc, |
33 | 33 | ||
34 | compiler ? "gcc7", | ||
34 | cmakeBuildType ? "Debug" | 35 | cmakeBuildType ? "Debug" |
35 | }: | 36 | }: |
36 | 37 | ||
37 | let | 38 | let |
38 | stdenv = nixpkgs.stdenv; | 39 | pkgs = import nixpkgs {}, |
40 | stdenv = pkgs.overrideCC pkgs.stdenv pkgs.${compiler}; | ||
41 | |||
39 | in rec { | 42 | in rec { |
40 | kasync = stdenv.mkDerivation { | 43 | kasync = stdenv.mkDerivation { |
41 | name = "kasync"; | 44 | name = "kasync"; |
42 | nativeBuildInputs = with nixpkgs; [ cmake ninja ccache ]; | 45 | nativeBuildInputs = with pkgs; [ cmake ninja ccache ]; |
43 | buildInputs = with nixpkgs; with qt5; | 46 | buildInputs = with pkgs; with qt5; |
44 | [ extra-cmake-modules qtbase ]; | 47 | [ extra-cmake-modules qtbase ]; |
45 | 48 | ||
46 | src = kasyncSrc; | 49 | src = kasyncSrc; |
@@ -50,8 +53,8 @@ in rec { | |||
50 | 53 | ||
51 | kimap2 = stdenv.mkDerivation { | 54 | kimap2 = stdenv.mkDerivation { |
52 | name = "kimap2"; | 55 | name = "kimap2"; |
53 | nativeBuildInputs = with nixpkgs; [ cmake ninja ccache ]; | 56 | nativeBuildInputs = with pkgs; [ cmake ninja ccache ]; |
54 | buildInputs = with nixpkgs; with qt5; with kdeFrameworks; | 57 | buildInputs = with pkgs; with qt5; with kdeFrameworks; |
55 | [ extra-cmake-modules qtbase kcoreaddons kcodecs kdeApplications.kmime cyrus_sasl ]; | 58 | [ extra-cmake-modules qtbase kcoreaddons kcodecs kdeApplications.kmime cyrus_sasl ]; |
56 | 59 | ||
57 | src = kimap2Src; | 60 | src = kimap2Src; |
@@ -60,8 +63,8 @@ in rec { | |||
60 | 63 | ||
61 | kdav2 = stdenv.mkDerivation { | 64 | kdav2 = stdenv.mkDerivation { |
62 | name = "kdav2"; | 65 | name = "kdav2"; |
63 | nativeBuildInputs = with nixpkgs; [ cmake ninja ccache ]; | 66 | nativeBuildInputs = with pkgs; [ cmake ninja ccache ]; |
64 | buildInputs = with nixpkgs; with qt5; with kdeFrameworks; | 67 | buildInputs = with pkgs; with qt5; with kdeFrameworks; |
65 | [ extra-cmake-modules qtbase qtxmlpatterns kcoreaddons ]; | 68 | [ extra-cmake-modules qtbase qtxmlpatterns kcoreaddons ]; |
66 | 69 | ||
67 | src = kdav2Src; | 70 | src = kdav2Src; |
@@ -71,8 +74,8 @@ in rec { | |||
71 | 74 | ||
72 | sink = stdenv.mkDerivation { | 75 | sink = stdenv.mkDerivation { |
73 | name = "sink"; | 76 | name = "sink"; |
74 | nativeBuildInputs = with nixpkgs; [ cmake ninja ccache ]; | 77 | nativeBuildInputs = with pkgs; [ cmake ninja ccache ]; |
75 | buildInputs = with nixpkgs; with qt5; with kdeApplications; | 78 | buildInputs = with pkgs; with qt5; with kdeApplications; |
76 | [ | 79 | [ |
77 | extra-cmake-modules kmime kcontacts kcalcore | 80 | extra-cmake-modules kmime kcontacts kcalcore |
78 | flatbuffers lmdb xapian cyrus_sasl curl libgit2 readline | 81 | flatbuffers lmdb xapian cyrus_sasl curl libgit2 readline |
@@ -93,8 +96,8 @@ in rec { | |||
93 | 96 | ||
94 | kube = stdenv.mkDerivation { | 97 | kube = stdenv.mkDerivation { |
95 | name = "kube"; | 98 | name = "kube"; |
96 | nativeBuildInputs = with nixpkgs; [ cmake ninja ccache ]; | 99 | nativeBuildInputs = with pkgs; [ cmake ninja ccache ]; |
97 | buildInputs = with nixpkgs; with qt5; with kdeFrameworks; with kdeApplications; with libsForQt5; | 100 | buildInputs = with pkgs; with qt5; with kdeFrameworks; with kdeApplications; with libsForQt5; |
98 | [ | 101 | [ |
99 | extra-cmake-modules kcalcore kcodecs kcontacts kmime | 102 | extra-cmake-modules kcalcore kcodecs kcontacts kmime |
100 | qtbase qtquickcontrols2 qtwebengine qgpgme | 103 | qtbase qtquickcontrols2 qtwebengine qgpgme |
@@ -107,7 +110,7 @@ in rec { | |||
107 | CCACHE_UMASK = "007"; | 110 | CCACHE_UMASK = "007"; |
108 | 111 | ||
109 | cmakeFlags = [ | 112 | cmakeFlags = [ |
110 | #"-DCMAKE_CXX_COMPILER_LAUNCHER=${nixpkgs.ccache}/bin/ccache" | 113 | #"-DCMAKE_CXX_COMPILER_LAUNCHER=${pkgs.ccache}/bin/ccache" |
111 | "-DCMAKE_CXX_FLAGS=-fdiagnostics-color=always" | 114 | "-DCMAKE_CXX_FLAGS=-fdiagnostics-color=always" |
112 | "-DCMAKE_EXPORT_COMPILE_COMMANDS=1" | 115 | "-DCMAKE_EXPORT_COMPILE_COMMANDS=1" |
113 | ]; | 116 | ]; |