@@ -150,7 +150,7 @@ let
#
# The build input 'faust' is automatically added to the
# propagatedBuildInputs.
wrapWithBuildEnv =
wrapWithBuildEnv = stdenv:
{ baseName
, propagatedBuildInputs ? [ ]
, ...
@@ -96,14 +96,14 @@ let
};

# Default values for faust2appl.
faust2ApplBase =
faust2ApplBase = {faust, ...}@deps:
{ baseName
, dir ? "tools/faust2appls"
, scripts ? [ baseName ]
, ...
}@args:

args // {
args // (with deps; {
name = "${baseName}-${version}";

inherit src;
@@ -136,7 +136,7 @@ let
meta = meta // {
description = "The ${baseName} script, part of faust functional programming language for realtime audio signal processing";
};
};
});

# Some 'faust2appl' scripts, such as faust2alsa, run faust to
# generate cpp code, then invoke the c++ compiler to build the code.
@@ -154,13 +154,13 @@ let
#
# The build input 'faust' is automatically added to the
# propagatedBuildInputs.
wrapWithBuildEnv =
wrapWithBuildEnv = { faust, makeWrapper, pkgconfig, ... }@deps:
{ baseName
, propagatedBuildInputs ? [ ]
, ...
}@args:

stdenv.mkDerivation ((faust2ApplBase args) // {
(faust2ApplBase deps args) // (with deps; {

buildInputs = [ makeWrapper pkgconfig ];

@@ -185,7 +185,7 @@ let
# simply need to be wrapped with some dependencies on PATH.
#
# The build input 'faust' is automatically added to the PATH.
wrap =
wrap = { faust, ... }@deps:
{ baseName
, runtimeInputs ? [ ]
, ...
@@ -195,7 +195,7 @@ let

runtimePath = concatStringsSep ":" (map (p: "${p}/bin") ([ faust ] ++ runtimeInputs));

in stdenv.mkDerivation ((faust2ApplBase args) // {
in (faust2ApplBase args) // (with deps; {

buildInputs = [ makeWrapper ];

@@ -120,14 +120,14 @@ let
};

# Default values for faust2appl.
faust2ApplBase =
faust2ApplBase = {faust, ...}@deps:
{ baseName
, dir ? "tools/faust2appls"
, scripts ? [ baseName ]
, ...
}@args:

args // {
args // (with deps; {
name = "${baseName}-${version}";

inherit src;
@@ -158,7 +158,7 @@ let
meta = meta // {
description = "The ${baseName} script, part of faust functional programming language for realtime audio signal processing";
};
};
});

# Some 'faust2appl' scripts, such as faust2alsa, run faust to
# generate cpp code, then invoke the c++ compiler to build the code.
@@ -176,13 +176,13 @@ let
#
# The build input 'faust' is automatically added to the
# propagatedBuildInputs.
wrapWithBuildEnv =
wrapWithBuildEnv = { faust, makeWrapper, pkgconfig, ... }@deps:
{ baseName
, propagatedBuildInputs ? [ ]
, ...
}@args:

stdenv.mkDerivation ((faust2ApplBase args) // {
(faust2ApplBase deps args) // (with deps; {

buildInputs = [ makeWrapper pkgconfig ];

@@ -206,7 +206,7 @@ let
# simply need to be wrapped with some dependencies on PATH.
#
# The build input 'faust' is automatically added to the PATH.
wrap =
wrap = { faust, ... }@deps:
{ baseName
, runtimeInputs ? [ ]
, ...
@@ -216,7 +216,7 @@ let

runtimePath = concatStringsSep ":" (map (p: "${p}/bin") ([ faust ] ++ runtimeInputs));

in stdenv.mkDerivation ((faust2ApplBase args) // {
in (faust2ApplBase deps args) // (with deps; {

buildInputs = [ makeWrapper ];

@@ -1,9 +1,10 @@
{ faust
{ stdenv, makeWrapper, pkgconfig
, faust
, alsaLib
, qt4
}:
}@deps:

faust.wrapWithBuildEnv {
stdenv.mkDerivation (faust.wrapWithBuildEnv deps {

baseName = "faust2alqt";

@@ -12,4 +13,4 @@ faust.wrapWithBuildEnv {
qt4
];

}
})
@@ -1,4 +1,5 @@
{ faust
{ stdenv, makeWrapper, pkgconfig
, faust
, alsaLib
, atk
, cairo
@@ -8,9 +9,9 @@
, glib
, gtk2
, pango
}:
}@deps:

faust.wrapWithBuildEnv {
stdenv.mkDerivation (faust.wrapWithBuildEnv deps {

baseName = "faust2alsa";

@@ -26,4 +27,4 @@ faust.wrapWithBuildEnv {
pango
];

}
})
@@ -1,8 +1,9 @@
{ faust
{ stdenv, makeWrapper, pkgconfig
, faust
, csound
}:
}@deps:

faust.wrapWithBuildEnv {
stdenv.mkDerivation (faust.wrapWithBuildEnv deps {

baseName = "faust2csound";

@@ -17,4 +18,4 @@ faust.wrapWithBuildEnv {
NIX_CFLAGS_COMPILE="$(printf '%s' "$NIX_CFLAGS_COMPILE" | sed 's%${csound}/include%${csound}/include/csound%')"
'';

}
})
@@ -1,14 +1,15 @@
{ faust
{ stdenv
, faust
, xdg_utils
}:
}@deps:

# This just runs faust2svg, then attempts to open a browser using
# 'xdg-open'.

faust.wrap {
stdenv.mkDerivation (faust.wrap deps {

baseName = "faust2firefox";

runtimeInputs = [ xdg_utils ];

}
})
@@ -1,10 +1,11 @@
{ faust
{ stdenv
, faust, makeWrapper, pkgconfig
, gtk2
, jack2Full
, opencv
}:
}@deps:

faust.wrapWithBuildEnv {
stdenv.mkDerivation (faust.wrapWithBuildEnv deps {

baseName = "faust2jack";

@@ -20,4 +21,4 @@ faust.wrapWithBuildEnv {
opencv
];

}
})
@@ -1,10 +1,11 @@
{ faust
{ stdenv, makeWrapper, pkgconfig
, faust
, jack2Full
, opencv
, qt4
}:
}@deps:

faust.wrapWithBuildEnv {
stdenv.mkDerivation (faust.wrapWithBuildEnv deps {

baseName = "faust2jaqt";

@@ -19,4 +20,4 @@ faust.wrapWithBuildEnv {
qt4
];

}
})
@@ -1,11 +1,12 @@
{ faust
{ stdenv, makeWrapper, pkgconfig
, faust
, lv2
}:
}@deps:

faust.wrapWithBuildEnv {
stdenv.mkDerivation (faust.wrapWithBuildEnv deps {

baseName = "faust2lv2";

propagatedBuildInputs = [ lv2 ];

}
})
@@ -1,14 +1,14 @@
{ boost
, faust1git
{ stdenv, makeWrapper, pkgconfig
, boost
, faust
, lv2
, qt4
}@deps:

}:

faust1git.wrapWithBuildEnv {
stdenv.mkDerivation (faust.wrapWithBuildEnv deps {

baseName = "faust2lv2";

propagatedBuildInputs = [ boost lv2 qt4 ];

}
})
@@ -0,0 +1,46 @@
#!/bin/sh

# Generate stats from the log produced by static-analysis.nix, such that we
# can report the result, and also such that we can report the delat on each
# modifications.

output() {

local alias=$1;
local unpatched=$2;
local recompile=$3;
echo "($alias alias, $unpatched unpatched, $recompile recompile)"
}

total() {
local alias=$1;
local unpatched=$2;
local recompile=$3;
output "$alias" "$unpatched" "$recompile"
}

delta() {
local alias=$1;
local unpatched=$2;
local recompile=$3;
if test "$alias" -ge 0; then alias="+$alias"; fi
if test "$unpatched" -ge 0; then unpatched="+$unpatched"; fi
if test "$recompile" -ge 0; then recompile="+$recompile"; fi
output "$alias" "$unpatched" "$recompile"
}

if test $# == 1; then
total $(grep -c ' error: alias' $1) \
$(grep -c ' error: unpatched' $1) \
$(grep -c ' warning:' $1)
elif test $# == 2; then
delta "$(( $(grep -c ' error: alias' $2) - $(grep -c ' error: alias' $1) ))" \
"$(( $(grep -c ' error: unpatched' $2) - $(grep -c ' error: unpatched' $1) ))" \
"$(( $(grep -c ' warning:' $2) - $(grep -c ' warning:' $1) ))"
else
echo 1>&2 "Usage: $0 stat.log [new-stat.log]
Output a summary of the static analysis which can be embedded in commit
messages.
"
fi
@@ -23,7 +23,7 @@ let
# Such annotations are useful to analyze the data-flow of the derivations,
# and to find issues which are not safe for applying ABI compatible
# patches.
rangeMax = 10;
rangeMax = 2;
genPkgs = with lib;
let generations = range 0 rangeMax; in
fold (gen: pkgs: annotatePkgs gen (pkgsFun pkgs)) pkgs generations;
@@ -62,13 +62,13 @@ let

annotateValue = path: value:
if isDerivation value then
# assert __trace (strict ["annotatePkgs::" generation] ++ path) true;
# assert __trace (["annotatePkgs::" generation] ++ path) true;
(mapAttrs (name: maybeAnnotateValue (path ++ [".drv" name])) value)
// {
_generation =
if value ? _generation then value._generation
else
# assert __trace (strict ["annotatePkgs>>" generation] ++ path) true;
# assert __trace (["annotatePkgs>>" generation] ++ path) true;
generation;
}
else if isFunction value && validFunctionName path then
@@ -140,11 +140,11 @@ let
old = inputsOlderThanGeneration generation 1 value;
};
messages = []
++ optional (generation != 0) "alias-original: generation ${toString generation}"
++ optional (inputs-by-generations.old != []) ''unpatched-inputs: generation ${toString generation}, inputs: ${
++ optional (generation != 0) "error: alias-original: generation ${toString generation}"
++ optional (inputs-by-generations.old != []) ''error: unpatched-inputs: generation ${toString generation}, inputs: ${
concatStringsSep ", " (map (d: "(${toString (getGeneration generation d)}, ${d.outPath})") inputs-by-generations.old)
}''
++ optional (inputs-by-generations.gen0 != []) ''static-linking: generation ${toString generation}, inputs: ${
++ optional (inputs-by-generations.gen0 != []) ''warning: static-linking: generation ${toString generation}, inputs: ${
concatStringsSep ", " (map (d: "(${toString (getGeneration generation d)}, ${d.outPath})") inputs-by-generations.gen0)
}'';
};
@@ -8,12 +8,15 @@
{ system, bootStdenv, noSysDirs, config, crossSystem, platform, lib
, pkgsWithOverrides
, ... }:
self: pkgs:

self: # This file fix-point, no overriden packages, no aliases. (do not use)
pkgs: # Contains statically linked packages.
deps: # Contains dynamically linked packages.

with pkgs;

with rec {
defaultScope = pkgs // pkgs.xorg;
defaultScope = deps // deps.xorg;

# We use `callPackage' to be able to omit function arguments that
# can be obtained from `pkgs' or `pkgs.xorg' (i.e. `defaultScope').