uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
55
pkgs/build-support/mkshell/default.nix
Normal file
55
pkgs/build-support/mkshell/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib, stdenv, buildEnv }:
|
||||
|
||||
# A special kind of derivation that is only meant to be consumed by the
|
||||
# nix-shell.
|
||||
{ name ? "nix-shell"
|
||||
, # a list of packages to add to the shell environment
|
||||
packages ? [ ]
|
||||
, # propagate all the inputs from the given derivations
|
||||
inputsFrom ? [ ]
|
||||
, buildInputs ? [ ]
|
||||
, nativeBuildInputs ? [ ]
|
||||
, propagatedBuildInputs ? [ ]
|
||||
, propagatedNativeBuildInputs ? [ ]
|
||||
, ...
|
||||
}@attrs:
|
||||
let
|
||||
mergeInputs = name:
|
||||
(attrs.${name} or [ ]) ++
|
||||
(lib.subtractLists inputsFrom (lib.flatten (lib.catAttrs name inputsFrom)));
|
||||
|
||||
rest = builtins.removeAttrs attrs [
|
||||
"name"
|
||||
"packages"
|
||||
"inputsFrom"
|
||||
"buildInputs"
|
||||
"nativeBuildInputs"
|
||||
"propagatedBuildInputs"
|
||||
"propagatedNativeBuildInputs"
|
||||
"shellHook"
|
||||
];
|
||||
in
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
inherit name;
|
||||
|
||||
buildInputs = mergeInputs "buildInputs";
|
||||
nativeBuildInputs = packages ++ (mergeInputs "nativeBuildInputs");
|
||||
propagatedBuildInputs = mergeInputs "propagatedBuildInputs";
|
||||
propagatedNativeBuildInputs = mergeInputs "propagatedNativeBuildInputs";
|
||||
|
||||
shellHook = lib.concatStringsSep "\n" (lib.catAttrs "shellHook"
|
||||
(lib.reverseList inputsFrom ++ [ attrs ]));
|
||||
|
||||
phases = [ "buildPhase" ];
|
||||
|
||||
buildPhase = ''
|
||||
echo "------------------------------------------------------------" >>$out
|
||||
echo " WARNING: the existence of this path is not guaranteed." >>$out
|
||||
echo " It is an internal implementation detail for pkgs.mkShell." >>$out
|
||||
echo "------------------------------------------------------------" >>$out
|
||||
echo >> $out
|
||||
# Record all build inputs as runtime dependencies
|
||||
export >> $out
|
||||
'';
|
||||
} // rest)
|
||||
Loading…
Add table
Add a link
Reference in a new issue