mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 04:12:44 +03:00
tests.haskell-shellFor: get compiling again
This commit is contained in:
parent
631899e7c1
commit
6bcfecbfa2
@ -1,7 +1,7 @@
|
||||
{ stdenv, haskellPackages, cabal-install }:
|
||||
{ lib, stdenv, haskellPackages, cabal-install }:
|
||||
|
||||
haskellPackages.shellFor {
|
||||
packages = p: [ p.database-id-class p.constraints-extras ];
|
||||
(haskellPackages.shellFor {
|
||||
packages = p: [ p.database-id-class p.constraints ];
|
||||
nativeBuildInputs = [ cabal-install ];
|
||||
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
|
||||
unpackPhase = ''
|
||||
@ -9,16 +9,25 @@ haskellPackages.shellFor {
|
||||
mkdir -p "$sourceRoot"
|
||||
cd "$sourceRoot"
|
||||
tar -xf ${haskellPackages.database-id-class.src}
|
||||
tar -xf ${haskellPackages.constraints-extras.src}
|
||||
cp ${builtins.toFile "cabal.project" "packages: database-id-class* constraints-extras*"} cabal.project
|
||||
tar -xf ${haskellPackages.constraints.src}
|
||||
cp ${builtins.toFile "cabal.project" "packages: database-id-class* constraints*"} cabal.project
|
||||
'';
|
||||
buildPhase = ''
|
||||
export HOME=$(mktemp -d)
|
||||
mkdir -p $HOME/.cabal
|
||||
touch $HOME/.cabal/config
|
||||
cabal v2-build --offline --verbose database-id-class constraints-extras --ghc-options="-O0 -j$NIX_BUILD_CORES"
|
||||
cabal v2-build --offline --verbose database-id-class constraints --ghc-options="-O0 -j$NIX_BUILD_CORES"
|
||||
'';
|
||||
installPhase = ''
|
||||
touch $out
|
||||
'';
|
||||
}
|
||||
}).overrideAttrs (oldAttrs: {
|
||||
meta =
|
||||
let
|
||||
oldMeta = oldAttrs.meta or {};
|
||||
oldMaintainers = oldMeta.maintainers or [];
|
||||
additionalMaintainers = with lib.maintainers; [ cdepillabout ];
|
||||
allMaintainers = oldMaintainers ++ additionalMaintainers;
|
||||
in
|
||||
oldMeta // { maintainers = allMaintainers; };
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user