add get* helper functions and mass-replace manual outputs search with them

This commit is contained in:
Nikolay Amiantov
2016-04-14 19:00:39 +03:00
parent c779e30d53
commit 5ff40ddedf
20 changed files with 67 additions and 64 deletions

View File

@@ -53,8 +53,8 @@ let
++ optional zlibSupport zlib;
mkPaths = paths: {
C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p.dev or p}/include") paths);
LIBRARY_PATH = concatStringsSep ":" (map (p: "${p.lib or (p.out or p)}/lib") paths);
C_INCLUDE_PATH = makeSearchPathOutput "dev" "include" paths;
LIBRARY_PATH = makeLibraryPath paths;
};
# Build the basic Python interpreter without modules that have

View File

@@ -102,8 +102,8 @@ let
propagatedBuildInputs = optional stdenv.isDarwin configd;
mkPaths = paths: {
C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p.dev or p}/include") paths);
LIBRARY_PATH = concatStringsSep ":" (map (p: "${p.lib or (p.out or p)}/lib") paths);
C_INCLUDE_PATH = makeSearchPathOutput "dev" "include" paths;
LIBRARY_PATH = makeLibraryPath paths;
};
# Build the basic Python interpreter without modules that have

View File

@@ -44,8 +44,8 @@ stdenv.mkDerivation {
${optionalString stdenv.isDarwin ''export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -msse2"''}
configureFlagsArray=( --enable-shared --with-threads --with-wide-unicode
CPPFLAGS="${concatStringsSep " " (map (p: "-I${p.dev or p}/include") buildInputs)}"
LDFLAGS="${concatStringsSep " " (map (p: "-L${p.lib or (p.out or p)}/lib") buildInputs)}"
CPPFLAGS="${makeSearchPathOutput "dev" "include" buildInputs}"
LDFLAGS="${makeLibraryPath buildInputs}"
LIBS="${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}"
)
'';

View File

@@ -46,8 +46,8 @@ stdenv.mkDerivation {
${optionalString stdenv.isDarwin ''export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -msse2"''}
configureFlagsArray=( --enable-shared --with-threads
CPPFLAGS="${concatStringsSep " " (map (p: "-I${p.dev or p}/include") buildInputs)}"
LDFLAGS="${concatStringsSep " " (map (p: "-L${p.lib or (p.out or p)}/lib") buildInputs)}"
CPPFLAGS="${makeSearchPathOutput "dev" "include" buildInputs}"
LDFLAGS="${makeLibraryPath buildInputs}"
LIBS="${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}"
)
'';

View File

@@ -58,8 +58,8 @@ stdenv.mkDerivation {
''}
configureFlagsArray=( --enable-shared --with-threads
CPPFLAGS="${concatStringsSep " " (map (p: "-I${p.dev or p}/include") buildInputs)}"
LDFLAGS="${concatStringsSep " " (map (p: "-L${p.lib or (p.out or p)}/lib") buildInputs)}"
CPPFLAGS="${makeSearchPathOutput "dev" "include" buildInputs}"
LDFLAGS="${makeLibraryPath buildInputs}"
LIBS="${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}"
)
'';

View File

@@ -58,8 +58,8 @@ stdenv.mkDerivation {
''}
configureFlagsArray=( --enable-shared --with-threads
CPPFLAGS="${concatStringsSep " " (map (p: "-I${p.dev or p}/include") buildInputs)}"
LDFLAGS="${concatStringsSep " " (map (p: "-L${p.lib or (p.out or p)}/lib") buildInputs)}"
CPPFLAGS="${makeSearchPathOutput "dev" "include" buildInputs}"
LDFLAGS="${makeLibraryPath buildInputs}"
LIBS="${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}"
)
'';