2
0
Fork 0
genodepkgs/tool/prepare-port/default.nix

43 lines
825 B
Nix

{ nixpkgs }:
let
shell = nixpkgs.buildPackages.bash + "/bin/sh";
initialPath = with nixpkgs.buildPackages;
[ coreutils
findutils
diffutils
gawk
gnugrep
gnused
gnutar
patch
gzip
bzip2
xz
];
in
{ name
, outputs ? [ "out" ]
, preferLocalBuild ? true
, ... } @ attrs:
derivation (attrs // {
inherit name outputs initialPath;
preparePort = derivation {
name = "prepare-port";
system = builtins.currentSystem;
builder = shell;
args = [ "-e" ./builder.sh ];
setup = ./setup.sh;
LD_SCRIPT_SO = ./genode_rel.ld;
inherit initialPath;
};
setupHook = ./../setup-hooks.sh;
system = builtins.currentSystem;
builder = attrs.realBuilder or shell;
args = attrs.args or [ "-e" (attrs.builder or ./default-builder.sh) ];
})