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
41
pkgs/development/tools/haskell/lambdabot/default.nix
Normal file
41
pkgs/development/tools/haskell/lambdabot/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ lib, haskellLib, makeWrapper, haskellPackages
|
||||
, mueval
|
||||
, withDjinn ? true
|
||||
, aspell ? null
|
||||
, packages ? (pkgs: [])
|
||||
, modules ? "oldDefaultModules"
|
||||
, configuration ? "[]"
|
||||
}:
|
||||
|
||||
let allPkgs = pkgs: mueval.defaultPkgs pkgs ++ [ pkgs.lambdabot-trusted ] ++ packages pkgs;
|
||||
mueval' = mueval.override {
|
||||
inherit haskellPackages;
|
||||
packages = allPkgs;
|
||||
};
|
||||
bins = lib.makeBinPath ([ mueval'
|
||||
(haskellPackages.ghcWithHoogle allPkgs)
|
||||
haskellPackages.unlambda
|
||||
haskellPackages.brainfuck
|
||||
]
|
||||
++ lib.optional withDjinn haskellPackages.djinn
|
||||
++ lib.optional (aspell != null) aspell
|
||||
);
|
||||
modulesStr = lib.replaceChars ["\n"] [" "] modules;
|
||||
configStr = lib.replaceChars ["\n"] [" "] configuration;
|
||||
|
||||
in haskellLib.overrideCabal (self: {
|
||||
patches = (self.patches or []) ++ [ ./custom-config.patch ];
|
||||
postPatch = (self.postPatch or "") + ''
|
||||
substituteInPlace src/Main.hs \
|
||||
--replace '@config@' '${configStr}'
|
||||
substituteInPlace src/Modules.hs \
|
||||
--replace '@modules@' '${modulesStr}'
|
||||
'';
|
||||
|
||||
buildTools = (self.buildTools or []) ++ [ makeWrapper ];
|
||||
|
||||
postInstall = (self.postInstall or "") + ''
|
||||
wrapProgram $out/bin/lambdabot \
|
||||
--prefix PATH ":" '${bins}'
|
||||
'';
|
||||
}) haskellPackages.lambdabot
|
||||
Loading…
Add table
Add a link
Reference in a new issue