mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
haskell lib: Make Cabal compiler names explicit
Cabal2nix expects a --compiler flag that contains a Cabal Compiler description. We used to use the compiler's derivation name for this, but this breaks when cross-compiling due to the target suffix. Instead we add an explicit haskellCompilerName attribute to Haskell compiler derivations.
This commit is contained in:
parent
b612597c3d
commit
bf687907d7
@ -96,7 +96,11 @@ stdenv.mkDerivation rec {
|
|||||||
[ $(./main) == "yes" ]
|
[ $(./main) == "yes" ]
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = { targetPrefix = ""; };
|
passthru = {
|
||||||
|
targetPrefix = "";
|
||||||
|
# Our Cabal compiler name
|
||||||
|
haskellCompilerName = "ghc";
|
||||||
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://haskell.org/ghc;
|
homepage = http://haskell.org/ghc;
|
||||||
|
@ -25,7 +25,12 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
|
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
|
||||||
|
|
||||||
passthru = { targetPrefix = ""; };
|
passthru = {
|
||||||
|
targetPrefix = "";
|
||||||
|
|
||||||
|
# Our Cabal compiler name
|
||||||
|
haskellCompilerName = "ghc";
|
||||||
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://haskell.org/ghc;
|
homepage = http://haskell.org/ghc;
|
||||||
|
@ -36,7 +36,12 @@ stdenv.mkDerivation rec {
|
|||||||
# that in turn causes GHCi to abort
|
# that in turn causes GHCi to abort
|
||||||
stripDebugFlags=["-S" "--keep-file-symbols"];
|
stripDebugFlags=["-S" "--keep-file-symbols"];
|
||||||
|
|
||||||
passthru = { targetPrefix = ""; };
|
passthru = {
|
||||||
|
targetPrefix = "";
|
||||||
|
|
||||||
|
# Our Cabal compiler name
|
||||||
|
haskellCompilerName = "ghc";
|
||||||
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://haskell.org/ghc;
|
homepage = http://haskell.org/ghc;
|
||||||
|
@ -134,7 +134,12 @@ stdenv.mkDerivation rec {
|
|||||||
[ $(./main) == "yes" ]
|
[ $(./main) == "yes" ]
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = { targetPrefix = ""; };
|
passthru = {
|
||||||
|
targetPrefix = "";
|
||||||
|
|
||||||
|
# Our Cabal compiler name
|
||||||
|
haskellCompilerName = "ghc";
|
||||||
|
};
|
||||||
|
|
||||||
meta.license = stdenv.lib.licenses.bsd3;
|
meta.license = stdenv.lib.licenses.bsd3;
|
||||||
meta.platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin"];
|
meta.platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin"];
|
||||||
|
@ -45,7 +45,12 @@ stdenv.mkDerivation rec {
|
|||||||
# that in turn causes GHCi to abort
|
# that in turn causes GHCi to abort
|
||||||
stripDebugFlags=["-S" "--keep-file-symbols"];
|
stripDebugFlags=["-S" "--keep-file-symbols"];
|
||||||
|
|
||||||
passthru = { targetPrefix = ""; };
|
passthru = {
|
||||||
|
targetPrefix = "";
|
||||||
|
|
||||||
|
# Our Cabal compiler name
|
||||||
|
haskellCompilerName = "ghc";
|
||||||
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://haskell.org/ghc;
|
homepage = http://haskell.org/ghc;
|
||||||
|
@ -169,6 +169,9 @@ stdenv.mkDerivation rec {
|
|||||||
inherit bootPkgs targetPrefix;
|
inherit bootPkgs targetPrefix;
|
||||||
|
|
||||||
inherit llvmPackages;
|
inherit llvmPackages;
|
||||||
|
|
||||||
|
# Our Cabal compiler name
|
||||||
|
haskellCompilerName = "ghc";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -55,7 +55,12 @@ stdenv.mkDerivation rec {
|
|||||||
# that in turn causes GHCi to abort
|
# that in turn causes GHCi to abort
|
||||||
stripDebugFlags=["-S" "--keep-file-symbols"];
|
stripDebugFlags=["-S" "--keep-file-symbols"];
|
||||||
|
|
||||||
passthru = { targetPrefix = ""; };
|
passthru = {
|
||||||
|
targetPprefix = "";
|
||||||
|
|
||||||
|
# Our Cabal compiler name
|
||||||
|
haskellCompilerName = "ghc";
|
||||||
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://haskell.org/ghc;
|
homepage = http://haskell.org/ghc;
|
||||||
|
@ -136,7 +136,12 @@ stdenv.mkDerivation rec {
|
|||||||
[ $(./main) == "yes" ]
|
[ $(./main) == "yes" ]
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = { targetPrefix = ""; };
|
passthru = {
|
||||||
|
targetPrefix = "";
|
||||||
|
|
||||||
|
# Our Cabal compiler name
|
||||||
|
haskellCompilerName = "ghc";
|
||||||
|
};
|
||||||
|
|
||||||
meta.license = stdenv.lib.licenses.bsd3;
|
meta.license = stdenv.lib.licenses.bsd3;
|
||||||
meta.platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin"];
|
meta.platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin"];
|
||||||
|
@ -56,7 +56,12 @@ stdenv.mkDerivation rec {
|
|||||||
# that in turn causes GHCi to abort
|
# that in turn causes GHCi to abort
|
||||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
|
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
|
||||||
|
|
||||||
passthru = { targetPrefix = ""; };
|
passthru = {
|
||||||
|
targetPrefix = "";
|
||||||
|
|
||||||
|
# Our Cabal compiler name
|
||||||
|
haskellCompilerName = "ghc";
|
||||||
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://haskell.org/ghc;
|
homepage = http://haskell.org/ghc;
|
||||||
|
@ -82,7 +82,12 @@ in stdenv.mkDerivation rec {
|
|||||||
# that in turn causes GHCi to abort
|
# that in turn causes GHCi to abort
|
||||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
|
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
|
||||||
|
|
||||||
passthru = { targetPrefix = ""; };
|
passthru = {
|
||||||
|
targetPrefix = "";
|
||||||
|
|
||||||
|
# Our Cabal compiler name
|
||||||
|
haskellCompilerName = "ghc";
|
||||||
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://haskell.org/ghc;
|
homepage = http://haskell.org/ghc;
|
||||||
|
@ -74,7 +74,12 @@ stdenv.mkDerivation rec {
|
|||||||
# that in turn causes GHCi to abort
|
# that in turn causes GHCi to abort
|
||||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
|
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
|
||||||
|
|
||||||
passthru = { targetPrefix = ""; };
|
passthru = {
|
||||||
|
targetPrefix = "";
|
||||||
|
|
||||||
|
# Our Cabal compiler name
|
||||||
|
haskellCompilerName = "ghc";
|
||||||
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://haskell.org/ghc;
|
homepage = http://haskell.org/ghc;
|
||||||
|
@ -170,6 +170,9 @@ stdenv.mkDerivation rec {
|
|||||||
inherit bootPkgs targetPrefix;
|
inherit bootPkgs targetPrefix;
|
||||||
|
|
||||||
inherit llvmPackages;
|
inherit llvmPackages;
|
||||||
|
|
||||||
|
# Our Cabal compiler name
|
||||||
|
haskellCompilerName = "ghc";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -181,6 +181,9 @@ stdenv.mkDerivation rec {
|
|||||||
inherit bootPkgs targetPrefix;
|
inherit bootPkgs targetPrefix;
|
||||||
|
|
||||||
inherit llvmPackages;
|
inherit llvmPackages;
|
||||||
|
|
||||||
|
# Our Cabal compiler name
|
||||||
|
haskellCompilerName = "ghc";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -178,6 +178,9 @@ stdenv.mkDerivation rec {
|
|||||||
inherit bootPkgs targetPrefix;
|
inherit bootPkgs targetPrefix;
|
||||||
|
|
||||||
inherit llvmPackages;
|
inherit llvmPackages;
|
||||||
|
|
||||||
|
# Our Cabal compiler name
|
||||||
|
haskellCompilerName = "ghc";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -178,6 +178,9 @@ stdenv.mkDerivation rec {
|
|||||||
inherit bootPkgs targetPrefix;
|
inherit bootPkgs targetPrefix;
|
||||||
|
|
||||||
inherit llvmPackages;
|
inherit llvmPackages;
|
||||||
|
|
||||||
|
# Our Cabal compiler name
|
||||||
|
haskellCompilerName = "ghc";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -120,7 +120,7 @@ let
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
export HOME="$TMP"
|
export HOME="$TMP"
|
||||||
mkdir -p "$out"
|
mkdir -p "$out"
|
||||||
cabal2nix --compiler=${self.ghc.name} --system=${stdenv.system} ${sha256Arg} "${src}" > "$out/default.nix"
|
cabal2nix --compiler=${ghc.haskellCompilerName} --system=${stdenv.system} ${sha256Arg} "${src}" > "$out/default.nix"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user