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
42
pkgs/development/compilers/openjdk/tests/hello.nix
Normal file
42
pkgs/development/compilers/openjdk/tests/hello.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ jdk
|
||||
, jre
|
||||
, pkgs
|
||||
}:
|
||||
|
||||
/* 'Hello world' Java application derivation for use in tests */
|
||||
let
|
||||
source = pkgs.writeTextDir "src/Hello.java" ''
|
||||
class Hello {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello, world!");
|
||||
}
|
||||
}
|
||||
'';
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "hello";
|
||||
version = "1.0.0";
|
||||
|
||||
src = source;
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuildPhase
|
||||
${jdk}/bin/javac src/Hello.java
|
||||
runHook postBuildPhase
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstallPhase
|
||||
|
||||
mkdir -p $out/lib
|
||||
cp src/Hello.class $out/lib
|
||||
|
||||
mkdir -p $out/bin
|
||||
cat >$out/bin/hello <<EOF;
|
||||
#!/usr/bin/env sh
|
||||
${jre}/bin/java -cp $out/lib Hello
|
||||
EOF
|
||||
chmod a+x $out/bin/hello
|
||||
|
||||
runHook postInstallPhase
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue