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
4
pkgs/test/haskell/setBuildTarget/Bar.hs
Normal file
4
pkgs/test/haskell/setBuildTarget/Bar.hs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
module Main where
|
||||
|
||||
main :: IO ()
|
||||
main = putStrLn "Hello, Bar!"
|
||||
4
pkgs/test/haskell/setBuildTarget/Foo.hs
Normal file
4
pkgs/test/haskell/setBuildTarget/Foo.hs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
module Main where
|
||||
|
||||
main :: IO ()
|
||||
main = putStrLn "Hello, Foo!"
|
||||
2
pkgs/test/haskell/setBuildTarget/Setup.hs
Normal file
2
pkgs/test/haskell/setBuildTarget/Setup.hs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import Distribution.Simple
|
||||
main = defaultMain
|
||||
43
pkgs/test/haskell/setBuildTarget/default.nix
Normal file
43
pkgs/test/haskell/setBuildTarget/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ pkgs, haskellPackages }:
|
||||
|
||||
let
|
||||
# This can be regenerated by running `cabal2nix .` in the current directory.
|
||||
pkgDef =
|
||||
{ mkDerivation, base, lib }:
|
||||
mkDerivation {
|
||||
pname = "haskell-setBuildTarget";
|
||||
version = "0.1.0.0";
|
||||
src = ./.;
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
executableHaskellDepends = [ base ];
|
||||
license = lib.licenses.bsd3;
|
||||
};
|
||||
|
||||
drv = haskellPackages.callPackage pkgDef {};
|
||||
|
||||
test = target: excluded:
|
||||
let only = pkgs.haskell.lib.compose.setBuildTarget target drv;
|
||||
in ''
|
||||
if [[ ! -f "${only}/bin/${target}" ]]; then
|
||||
echo "${target} was not built"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -f "${only}/bin/${excluded}" ]]; then
|
||||
echo "${excluded} was built, when it should not have been"
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
|
||||
in
|
||||
pkgs.runCommand "test haskell.lib.compose.setBuildTarget" {
|
||||
meta = {
|
||||
inherit (drv.meta) platforms;
|
||||
};
|
||||
} ''
|
||||
${test "foo" "bar"}
|
||||
${test "bar" "foo"}
|
||||
touch "$out"
|
||||
''
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
cabal-version: >=1.10
|
||||
name: haskell-setBuildTarget
|
||||
version: 0.1.0.0
|
||||
author: Isaac Shapira
|
||||
maintainer: fresheyeball@protonmail.com
|
||||
build-type: Simple
|
||||
|
||||
executable foo
|
||||
main-is: Foo.hs
|
||||
build-depends: base
|
||||
default-language: Haskell2010
|
||||
|
||||
executable bar
|
||||
main-is: Bar.hs
|
||||
build-depends: base
|
||||
default-language: Haskell2010
|
||||
Loading…
Add table
Add a link
Reference in a new issue