add get* helper functions and mass-replace manual outputs search with them
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"}"
|
||||
)
|
||||
'';
|
||||
|
||||
@@ -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"}"
|
||||
)
|
||||
'';
|
||||
|
||||
@@ -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"}"
|
||||
)
|
||||
'';
|
||||
|
||||
@@ -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"}"
|
||||
)
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user