Skip to content

Commit

Permalink
Restore more accurate history of the master branch
Browse files Browse the repository at this point in the history
The first child is the proper master.
The second child is the proper staging.
The third child is FRidh work.
The forth child is the previous master at origin.
  • Loading branch information
orivej committed Nov 25, 2017
4 parents 88eea69 + 9d2bd32 + c06bc73 + 5233333 commit fbbda41
Show file tree
Hide file tree
Showing 147 changed files with 598 additions and 475 deletions.
2 changes: 1 addition & 1 deletion pkgs/applications/office/paperwork/backend.nix
Expand Up @@ -9,7 +9,7 @@
}:

buildPythonPackage rec {
name = "paperwork-backend-${version}";
pname = "paperwork-backend";
version = "1.2.1";

src = fetchFromGitHub {
Expand Down
12 changes: 1 addition & 11 deletions pkgs/build-support/setup-hooks/multiple-outputs.sh
Expand Up @@ -164,8 +164,6 @@ _multioutDevs() {
}

# Make the "dev" propagate other outputs needed for development.
# Note: with current cross-building setup, all packages are "native" if not cross-building;
# however, if cross-building, the outputs are non-native. We have to choose the right file.
_multioutPropagateDev() {
if [ "$outputs" = "out" ]; then return; fi;

Expand Down Expand Up @@ -193,16 +191,8 @@ _multioutPropagateDev() {
return
fi

local propagatedBuildInputsFile
if [ -z "$crossConfig" ]; then
propagatedBuildInputsFile=propagated-native-build-inputs
else
propagatedBuildInputsFile=propagated-build-inputs
fi

mkdir -p "${!propagaterOutput}"/nix-support
for output in $propagatedBuildOutputs; do
echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/$propagatedBuildInputsFile
echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs
done
}

2 changes: 1 addition & 1 deletion pkgs/build-support/trivial-builders.nix
Expand Up @@ -101,7 +101,7 @@ rec {
mkdir -p $out/nix-support
cp ${script} $out/nix-support/setup-hook
'' + lib.optionalString (deps != []) ''
printWords ${toString deps} > $out/nix-support/propagated-native-build-inputs
printWords ${toString deps} > $out/nix-support/propagated-build-inputs
'' + lib.optionalString (substitutions != {}) ''
substituteAll ${script} $out/nix-support/setup-hook
'');
Expand Down
3 changes: 2 additions & 1 deletion pkgs/data/misc/tzdata/default.nix
Expand Up @@ -33,7 +33,8 @@ stdenv.mkDerivation rec {
postInstall =
''
rm $out/share/zoneinfo-posix
ln -s . $out/share/zoneinfo/posix
mkdir $out/share/zoneinfo/posix
( cd $out/share/zoneinfo/posix; ln -s ../* .; rm posix )
mv $out/share/zoneinfo-leaps $out/share/zoneinfo/right
mkdir -p "$dev/include"
Expand Down
6 changes: 1 addition & 5 deletions pkgs/desktops/plasma-5/default.nix
Expand Up @@ -58,11 +58,7 @@ let
# Propagate $dev so that this setup hook is propagated
# But only if there is a separate $dev output
if [ "$outputDev" != out ]; then
if [ -n "$crossConfig" ]; then
propagatedBuildInputs="$propagatedBuildInputs @dev@"
else
propagatedNativeBuildInputs="$propagatedNativeBuildInputs @dev@"
fi
propagatedBuildInputs="$propagatedBuildInputs @dev@"
fi
fi
'';
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/jsonnet/default.nix
Expand Up @@ -4,6 +4,7 @@ let version = "0.9.4"; in

stdenv.mkDerivation {
name = "jsonnet-${version}";
version = version;

src = fetchFromGitHub {
rev = "v${version}";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/openjdk-darwin/8.nix
Expand Up @@ -33,7 +33,7 @@ let
# any package that depends on the JRE has $CLASSPATH set up
# properly.
mkdir -p $out/nix-support
printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/jre/lib/libfontmanager.dylib
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/openjdk-darwin/default.nix
Expand Up @@ -23,7 +23,7 @@ let
# any package that depends on the JRE has $CLASSPATH set up
# properly.
mkdir -p $out/nix-support
printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/jre/lib/libfontmanager.dylib
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/openjdk/7.nix
Expand Up @@ -184,13 +184,13 @@ let
preFixup = ''
prefix=$jre stripDirs "$stripDebugList" "''${stripDebugFlags:--S}"
patchELF $jre
propagatedNativeBuildInputs+=" $jre"
propagatedBuildInputs+=" $jre"
# Propagate the setJavaClassPath setup hook from the JRE so that
# any package that depends on the JRE has $CLASSPATH set up
# properly.
mkdir -p $jre/nix-support
printWords ${setJavaClassPath} > $jre/nix-support/propagated-native-build-inputs
printWords ${setJavaClassPath} > $jre/nix-support/propagated-build-inputs
# Set JAVA_HOME automatically.
mkdir -p $out/nix-support
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/openjdk/8.nix
Expand Up @@ -206,13 +206,13 @@ let
preFixup = ''
prefix=$jre stripDirs "$stripDebugList" "''${stripDebugFlags:--S}"
patchELF $jre
propagatedNativeBuildInputs+=" $jre"
propagatedBuildInputs+=" $jre"
# Propagate the setJavaClassPath setup hook from the JRE so that
# any package that depends on the JRE has $CLASSPATH set up
# properly.
mkdir -p $jre/nix-support
printWords ${setJavaClassPath} > $jre/nix-support/propagated-native-build-inputs
printWords ${setJavaClassPath} > $jre/nix-support/propagated-build-inputs
# Set JAVA_HOME automatically.
mkdir -p $out/nix-support
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/openjdk/9.nix
Expand Up @@ -204,14 +204,14 @@ let
preFixup = ''
prefix=$jre stripDirs "$stripDebugList" "''${stripDebugFlags:--S}"
patchELF $jre
propagatedNativeBuildInputs+=" $jre"
propagatedBuildInputs+=" $jre"
# Propagate the setJavaClassPath setup hook from the JRE so that
# any package that depends on the JRE has $CLASSPATH set up
# properly.
mkdir -p $jre/nix-support
#TODO or printWords? cf https://github.com/NixOS/nixpkgs/pull/27427#issuecomment-317293040
echo -n "${setJavaClassPath}" > $jre/nix-support/propagated-native-build-inputs
echo -n "${setJavaClassPath}" > $jre/nix-support/propagated-build-inputs
# Set JAVA_HOME automatically.
mkdir -p $out/nix-support
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
Expand Up @@ -166,7 +166,7 @@ let result = stdenv.mkDerivation rec {
ln -s $jrePath/lib/${architecture}/libnpjp2.so $jrePath/lib/${architecture}/plugins
mkdir -p $out/nix-support
printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
# Set JAVA_HOME automatically.
cat <<EOF >> $out/nix-support/setup-hook
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/oraclejdk/jdk9-linux.nix
Expand Up @@ -124,7 +124,7 @@ let result = stdenv.mkDerivation rec {
ln -s $out $out/jre
mkdir -p $out/nix-support
printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
# Set JAVA_HOME automatically.
cat <<EOF >> $out/nix-support/setup-hook
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/zulu/8.nix
Expand Up @@ -54,7 +54,7 @@ in stdenv.mkDerivation rec {
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
mkdir -p $out/nix-support
printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
# Set JAVA_HOME automatically.
cat <<EOF >> $out/nix-support/setup-hook
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/zulu/default.nix
Expand Up @@ -51,7 +51,7 @@ in stdenv.mkDerivation rec {
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
mkdir -p $out/nix-support
printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
# Set JAVA_HOME automatically.
cat <<EOF >> $out/nix-support/setup-hook
Expand Down
16 changes: 11 additions & 5 deletions pkgs/development/interpreters/python/build-python-package.nix
@@ -1,11 +1,14 @@
/* This function provides a generic Python package builder. It is
intended to work with packages that use `distutils/setuptools'
(http://pypi.python.org/pypi/setuptools/), which represents a large
number of Python packages nowadays. */
# This function provides a generic Python package builder,
# and can build packages that use distutils, setuptools or flit.

{ lib
, python
, mkPythonDerivation
, wrapPython
, setuptools
, unzip
, ensureNewerSourcesHook
, pythonModule
, namePrefix
, bootstrapped-pip
, flit
}:
Expand All @@ -15,6 +18,9 @@ let
flit-specific = import ./build-python-package-flit.nix { inherit python flit; };
wheel-specific = import ./build-python-package-wheel.nix { };
common = import ./build-python-package-common.nix { inherit python bootstrapped-pip; };
mkPythonDerivation = import ./mk-python-derivation.nix {
inherit lib python wrapPython setuptools unzip ensureNewerSourcesHook pythonModule namePrefix;
};
in

{
Expand Down
Expand Up @@ -201,7 +201,7 @@ in stdenv.mkDerivation {
in rec {
inherit libPrefix sitePackages x11Support hasDistutilsCxxPatch;
executable = libPrefix;
buildEnv = callPackage ../../wrapper.nix { python = self; };
buildEnv = callPackage ../../wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
pkgs = pythonPackages;
isPy2 = true;
Expand Down
Expand Up @@ -160,7 +160,7 @@ in stdenv.mkDerivation {
in rec {
inherit libPrefix sitePackages x11Support;
executable = "${libPrefix}m";
buildEnv = callPackage ../../wrapper.nix { python = self; };
buildEnv = callPackage ../../wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
pkgs = pythonPackages;
isPy3 = true;
Expand Down
Expand Up @@ -154,7 +154,7 @@ in stdenv.mkDerivation {
in rec {
inherit libPrefix sitePackages x11Support;
executable = "${libPrefix}m";
buildEnv = callPackage ../../wrapper.nix { python = self; };
buildEnv = callPackage ../../wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
pkgs = pythonPackages;
isPy3 = true;
Expand Down
Expand Up @@ -153,7 +153,7 @@ in stdenv.mkDerivation {
in rec {
inherit libPrefix sitePackages x11Support;
executable = "${libPrefix}m";
buildEnv = callPackage ../../wrapper.nix { python = self; };
buildEnv = callPackage ../../wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
pkgs = pythonPackages;
isPy3 = true;
Expand Down
34 changes: 17 additions & 17 deletions pkgs/development/interpreters/python/mk-python-derivation.nix
@@ -1,18 +1,18 @@
/* Generic builder for Python packages that come without a setup.py. */
# Generic builder.

{ lib
, python
, wrapPython
, setuptools
, unzip
, ensureNewerSourcesHook
# Whether the derivation provides a Python module or not.
, pythonModule
, namePrefix
}:

{ name ? "${attrs.pname}-${attrs.version}"

# by default prefix `name` e.g. "python3.3-${name}"
, namePrefix ? python.libPrefix + "-"

# Dependencies for building the package
, buildInputs ? []

Expand Down Expand Up @@ -54,18 +54,21 @@ if disabled
then throw "${name} not supported for interpreter ${python.executable}"
else

python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled" "checkInputs"] // {
python.stdenv.mkDerivation (builtins.removeAttrs attrs [
"disabled" "checkInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts"
] // {

name = namePrefix + name;

inherit pythonPath;

buildInputs = [ wrapPython ] ++ buildInputs ++ pythonPath
++ [ (ensureNewerSourcesHook { year = "1980"; }) ]
buildInputs = ([ wrapPython (ensureNewerSourcesHook { year = "1980"; }) ]
++ (lib.optional (lib.hasSuffix "zip" attrs.src.name or "") unzip)
++ lib.optionals doCheck checkInputs;
++ lib.optionals doCheck checkInputs
++ lib.optional catchConflicts setuptools # If we nog longer propagate setuptools
++ buildInputs
++ pythonPath
);

# propagate python/setuptools to active setup-hook in nix-shell
# Propagate python and setuptools. We should stop propagating setuptools.
propagatedBuildInputs = propagatedBuildInputs ++ [ python setuptools ];

# Python packages don't have a checkPhase, only an installCheckPhase
Expand All @@ -83,15 +86,12 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled" "checkInputs"

passthru = {
inherit python; # The python interpreter
inherit pythonModule;
} // passthru;

meta = with lib.maintainers; {
meta = {
# default to python's platforms
platforms = python.meta.platforms;
} // meta // {
# add extra maintainer(s) to every package
maintainers = (meta.maintainers or []) ++ [ chaoflow ];
# a marker for release utilities to discover python packages
isBuildPythonPackage = python.meta.platforms;
};
} // meta;
})
2 changes: 1 addition & 1 deletion pkgs/development/interpreters/python/pypy/2.7/default.nix
Expand Up @@ -137,7 +137,7 @@ in stdenv.mkDerivation rec {
inherit zlibSupport libPrefix sitePackages;
executable = "pypy";
isPypy = true;
buildEnv = callPackage ../../wrapper.nix { python = self; };
buildEnv = callPackage ../../wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
interpreter = "${self}/bin/${executable}";
withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
pkgs = pythonPackages;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/interpreters/python/wrap.sh
Expand Up @@ -83,7 +83,7 @@ wrapPythonProgramsIn() {

# Adds the lib and bin directories to the PYTHONPATH and PATH variables,
# respectively. Recurses on any paths declared in
# `propagated-native-build-inputs`, while avoiding duplicating paths by
# `propagated-build-inputs`, while avoiding duplicating paths by
# flagging the directories it has visited in `pythonPathsSeen`.
_addToPythonPath() {
local dir="$1"
Expand All @@ -96,7 +96,7 @@ _addToPythonPath() {
addToSearchPath program_PATH $dir/bin

# Inspect the propagated inputs (if they exist) and recur on them.
local prop="$dir/nix-support/propagated-native-build-inputs"
local prop="$dir/nix-support/propagated-build-inputs"
if [ -e $prop ]; then
local new_path
for new_path in $(cat $prop); do
Expand Down
7 changes: 4 additions & 3 deletions pkgs/development/interpreters/python/wrapper.nix
Expand Up @@ -2,13 +2,14 @@
, extraLibs ? []
, extraOutputsToInstall ? []
, postBuild ? ""
, ignoreCollisions ? false }:
, ignoreCollisions ? false
, requiredPythonModules
, }:

# Create a python executable that knows about additional packages.
let
recursivePthLoader = import ../../python-modules/recursive-pth-loader/default.nix { stdenv = stdenv; python = python; };
env = let
paths = stdenv.lib.closePropagation (extraLibs ++ [ python recursivePthLoader ] ) ;
paths = requiredPythonModules (extraLibs ++ [ python ] ) ;
in buildEnv {
name = "${python.name}-env";

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/boost/generic.nix
Expand Up @@ -125,7 +125,7 @@ in
stdenv.mkDerivation {
name = "boost-${version}";

inherit src patches;
inherit src patches version;

meta = {
homepage = http://boost.org/;
Expand Down
18 changes: 6 additions & 12 deletions pkgs/development/libraries/grantlee/5/setup-hook.sh
Expand Up @@ -4,20 +4,14 @@ providesGrantleeRuntime() {
[ -d "$1/$grantleePluginPrefix" ]
}

_grantleeCrossEnvHook() {
if providesQtRuntime "$1"; then
propagatedBuildInputs+=" $1"
propagatedUserEnvPkgs+=" $1"
fi
}
crossEnvHooks+=(_grantleeCrossEnvHook)

_grantleeEnvHook() {
if providesGrantleeRuntime "$1"; then
propagatedNativeBuildInputs+=" $1"
if [ -z "$crossConfig" ]; then
propagatedBuildInputs+=" $1"
propagatedUserEnvPkgs+=" $1"
fi
fi
}
envHooks+=(_grantleeEnvHook)
if [ "$crossEnv" ]; then
crossEnvHooks+=(_grantleeEnvHook)
else
envHooks+=(_grantleeEnvHook)
fi

0 comments on commit fbbda41

Please sign in to comment.