diff --git a/pkgs/development/compilers/ghc/8.10.7.nix b/pkgs/development/compilers/ghc/8.10.7.nix index 1b4dac4a9768..40b57223fa1d 100644 --- a/pkgs/development/compilers/ghc/8.10.7.nix +++ b/pkgs/development/compilers/ghc/8.10.7.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, pkgsBuildTarget, targetPackages +{ lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages # build-tools , bootPkgs @@ -152,7 +152,7 @@ let # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856 # see #84670 and #49071 for more background. useLdGold = targetPlatform.linker == "gold" || - (targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); + (targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); # Makes debugging easier to see which variant is at play in `nix-store -q --tree`. variantSuffix = lib.concatStrings [ @@ -161,6 +161,14 @@ let ]; in + +# C compiler, bintools and LLVM are used at build time, but will also leak into +# the resulting GHC's settings file and used at runtime. This means that we are +# currently only able to build GHC if hostPlatform == buildPlatform. +assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc; +assert buildTargetLlvmPackages.llvm == llvmPackages.llvm; +assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang; + stdenv.mkDerivation (rec { version = "8.10.7"; pname = "${targetPrefix}ghc${variantSuffix}"; @@ -230,15 +238,12 @@ stdenv.mkDerivation (rec { export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool" export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool" '' + lib.optionalString useLLVM '' - export LLC="${lib.getBin llvmPackages.llvm}/bin/llc" - export OPT="${lib.getBin llvmPackages.llvm}/bin/opt" - '' + lib.optionalString (targetCC.isClang || (useLLVM && stdenv.targetPlatform.isDarwin)) (let - # LLVM backend on Darwin needs clang, if we are already using clang, might as well set the environment variable. - # See also https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm - clang = if targetCC.isClang then targetCC else llvmPackages.clang; - in '' - export CLANG="${clang}/bin/${clang.targetPrefix}clang" - '') + '' + export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc" + export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt" + '' + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) '' + # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm + export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang" + '' + '' echo -n "${buildMK}" > mk/build.mk sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure diff --git a/pkgs/development/compilers/ghc/8.8.4.nix b/pkgs/development/compilers/ghc/8.8.4.nix index ffa2c473eec6..3ce47a20bad8 100644 --- a/pkgs/development/compilers/ghc/8.8.4.nix +++ b/pkgs/development/compilers/ghc/8.8.4.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, pkgsBuildTarget, targetPackages +{ lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages # build-tools , bootPkgs @@ -142,7 +142,7 @@ let # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856 # see #84670 and #49071 for more background. useLdGold = targetPlatform.linker == "gold" || - (targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); + (targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); # Makes debugging easier to see which variant is at play in `nix-store -q --tree`. variantSuffix = lib.concatStrings [ @@ -151,6 +151,14 @@ let ]; in + +# C compiler, bintools and LLVM are used at build time, but will also leak into +# the resulting GHC's settings file and used at runtime. This means that we are +# currently only able to build GHC if hostPlatform == buildPlatform. +assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc; +assert buildTargetLlvmPackages.llvm == llvmPackages.llvm; +assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang; + stdenv.mkDerivation (rec { version = "8.8.4"; pname = "${targetPrefix}ghc${variantSuffix}"; @@ -217,15 +225,12 @@ stdenv.mkDerivation (rec { export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf" export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip" '' + lib.optionalString useLLVM '' - export LLC="${lib.getBin llvmPackages.llvm}/bin/llc" - export OPT="${lib.getBin llvmPackages.llvm}/bin/opt" - '' + lib.optionalString (targetCC.isClang || (useLLVM && stdenv.targetPlatform.isDarwin)) (let - # LLVM backend on Darwin needs clang, if we are already using clang, might as well set the environment variable. - # See also https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm - clang = if targetCC.isClang then targetCC else llvmPackages.clang; - in '' - export CLANG="${clang}/bin/${clang.targetPrefix}clang" - '') + '' + export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc" + export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt" + '' + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) '' + # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm + export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang" + '' + '' echo -n "${buildMK dontStrip}" > mk/build.mk sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure diff --git a/pkgs/development/compilers/ghc/9.0.1.nix b/pkgs/development/compilers/ghc/9.0.1.nix index cd4a8acebba0..3f13fe1b9e1b 100644 --- a/pkgs/development/compilers/ghc/9.0.1.nix +++ b/pkgs/development/compilers/ghc/9.0.1.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, pkgsBuildTarget, targetPackages +{ lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages # build-tools , bootPkgs @@ -147,7 +147,7 @@ let # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856 # see #84670 and #49071 for more background. useLdGold = targetPlatform.linker == "gold" || - (targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); + (targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); # Makes debugging easier to see which variant is at play in `nix-store -q --tree`. variantSuffix = lib.concatStrings [ @@ -156,6 +156,14 @@ let ]; in + +# C compiler, bintools and LLVM are used at build time, but will also leak into +# the resulting GHC's settings file and used at runtime. This means that we are +# currently only able to build GHC if hostPlatform == buildPlatform. +assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc; +assert buildTargetLlvmPackages.llvm == llvmPackages.llvm; +assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang; + stdenv.mkDerivation (rec { version = "9.0.1"; pname = "${targetPrefix}ghc${variantSuffix}"; @@ -196,15 +204,12 @@ stdenv.mkDerivation (rec { export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool" export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool" '' + lib.optionalString useLLVM '' - export LLC="${lib.getBin llvmPackages.llvm}/bin/llc" - export OPT="${lib.getBin llvmPackages.llvm}/bin/opt" - '' + lib.optionalString (targetCC.isClang || (useLLVM && stdenv.targetPlatform.isDarwin)) (let - # LLVM backend on Darwin needs clang, if we are already using clang, might as well set the environment variable. - # See also https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm - clang = if targetCC.isClang then targetCC else llvmPackages.clang; - in '' - export CLANG="${clang}/bin/${clang.targetPrefix}clang" - '') + '' + export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc" + export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt" + '' + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) '' + # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm + export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang" + '' + '' echo -n "${buildMK}" > mk/build.mk sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure diff --git a/pkgs/development/compilers/ghc/9.2.1.nix b/pkgs/development/compilers/ghc/9.2.1.nix index 8361d4e939b7..77d741a4f2b8 100644 --- a/pkgs/development/compilers/ghc/9.2.1.nix +++ b/pkgs/development/compilers/ghc/9.2.1.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, pkgsBuildTarget, targetPackages +{ lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages # build-tools , bootPkgs @@ -147,7 +147,8 @@ let # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues. # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856 # see #84670 and #49071 for more background. - useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && !targetPlatform.isMusl); + useLdGold = targetPlatform.linker == "gold" || + (targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); # Makes debugging easier to see which variant is at play in `nix-store -q --tree`. variantSuffix = lib.concatStrings [ @@ -156,6 +157,14 @@ let ]; in + +# C compiler, bintools and LLVM are used at build time, but will also leak into +# the resulting GHC's settings file and used at runtime. This means that we are +# currently only able to build GHC if hostPlatform == buildPlatform. +assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc; +assert buildTargetLlvmPackages.llvm == llvmPackages.llvm; +assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang; + stdenv.mkDerivation (rec { version = "9.2.1"; pname = "${targetPrefix}ghc${variantSuffix}"; @@ -196,15 +205,12 @@ stdenv.mkDerivation (rec { export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool" export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool" '' + lib.optionalString useLLVM '' - export LLC="${lib.getBin llvmPackages.llvm}/bin/llc" - export OPT="${lib.getBin llvmPackages.llvm}/bin/opt" - '' + lib.optionalString (targetCC.isClang || (useLLVM && stdenv.targetPlatform.isDarwin)) (let - # LLVM backend on Darwin needs clang, if we are already using clang, might as well set the environment variable. - # See also https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm - clang = if targetCC.isClang then targetCC else llvmPackages.clang; - in '' - export CLANG="${clang}/bin/${clang.targetPrefix}clang" - '') + '' + export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc" + export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt" + '' + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) '' + # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm + export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang" + '' + '' echo -n "${buildMK}" > mk/build.mk sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index d88d4493bb64..9a5767446158 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, pkgsBuildTarget, targetPackages +{ lib, stdenv, pkgsBuildTarget, pkgsHostTarget, targetPackages # build-tools , bootPkgs @@ -161,7 +161,7 @@ let # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856 # see #84670 and #49071 for more background. useLdGold = targetPlatform.linker == "gold" || - (targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); + (targetPlatform.linker == "bfd" && (targetCC.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); # Makes debugging easier to see which variant is at play in `nix-store -q --tree`. variantSuffix = lib.concatStrings [ @@ -170,6 +170,14 @@ let ]; in + +# C compiler, bintools and LLVM are used at build time, but will also leak into +# the resulting GHC's settings file and used at runtime. This means that we are +# currently only able to build GHC if hostPlatform == buildPlatform. +assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc; +assert buildTargetLlvmPackages.llvm == llvmPackages.llvm; +assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang; + stdenv.mkDerivation (rec { inherit version; inherit (src) rev; @@ -210,15 +218,12 @@ stdenv.mkDerivation (rec { export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool" export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool" '' + lib.optionalString useLLVM '' - export LLC="${lib.getBin llvmPackages.llvm}/bin/llc" - export OPT="${lib.getBin llvmPackages.llvm}/bin/opt" - '' + lib.optionalString (targetCC.isClang || (useLLVM && stdenv.targetPlatform.isDarwin)) (let - # LLVM backend on Darwin needs clang, if we are already using clang, might as well set the environment variable. - # See also https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm - clang = if targetCC.isClang then targetCC else llvmPackages.clang; - in '' - export CLANG="${clang}/bin/${clang.targetPrefix}clang" - '') + '' + export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc" + export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt" + '' + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) '' + # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm + export CLANG="${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang" + '' + '' # otherwise haddock fails when generating the compiler docs export LANG=C.UTF-8 diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 87d1cef58570..3fee8b0e07fa 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -54,6 +54,10 @@ self: super: { ghc-datasize = disableLibraryProfiling super.ghc-datasize; ghc-vis = disableLibraryProfiling super.ghc-vis; + # We can remove this once fakedata version gets to 1.0.1 as the test suite + # works fine there. + fakedata = dontCheck super.fakedata; + # This test keeps being aborted because it runs too quietly for too long Lazy-Pbkdf2 = if pkgs.stdenv.isi686 then dontCheck super.Lazy-Pbkdf2 else super.Lazy-Pbkdf2; @@ -1338,7 +1342,7 @@ self: super: { graphql-engine = overrideCabal (drv: { patches = [ ./patches/graphql-engine-mapkeys.patch ]; doHaddock = false; - version = "2.0.9"; + version = "2.0.10"; }) (super.graphql-engine.overrideScope (self: super: { immortal = self.immortal_0_2_2_1; resource-pool = self.hasura-resource-pool; @@ -2110,9 +2114,7 @@ EOT brick = self.brick_0_64_2; }; - # Needs matching xmonad version - xmonad-contrib_0_17_0 = super.xmonad-contrib_0_17_0.override { - xmonad = self.xmonad_0_17_0; - }; + # build newer version for `pkgs.shellcheck` + ShellCheck_0_8_0 = doDistribute super.ShellCheck_0_8_0; } // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index fd16757e5222..15e7b1ca0358 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -1352,7 +1352,6 @@ broken-packages: - fadno-braids - failable-list - failure-detector - - fakedata - fake-type - faktory - f-algebra-gen diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml index 454e9eecb5e4..2da294cb523b 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml @@ -1084,7 +1084,6 @@ dont-distribute-packages: - extract-dependencies - extrapolate - factual-api - - fakedata-quickcheck - falling-turnip - fallingblocks - family-tree @@ -1514,7 +1513,6 @@ dont-distribute-packages: - heavy-logger-instances - hecc - hedgehog-checkers-lens - - hedgehog-fakedata - hedgehog-gen-json - hedis-pile - heist-aeson diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 0dff5a18fa65..df3c42b5de3e 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -223,6 +223,17 @@ self: super: builtins.intersectAttrs super { # Nix-specific workaround xmonad = appendPatch ./patches/xmonad-nix.patch (dontCheck super.xmonad); + xmonad_0_17_0 = doDistribute (appendPatch ./patches/xmonad_0_17_0-nix.patch (super.xmonad_0_17_0)); + + # Need matching xmonad version + xmonad-contrib_0_17_0 = doDistribute (super.xmonad-contrib_0_17_0.override { + xmonad = self.xmonad_0_17_0; + }); + + xmonad-extras_0_17_0 = doDistribute (super.xmonad-extras_0_17_0.override { + xmonad = self.xmonad_0_17_0; + xmonad-contrib = self.xmonad-contrib_0_17_0; + }); # wxc supports wxGTX >= 3.0, but our current default version points to 2.8. # http://hydra.cryp.to/build/1331287/log/raw @@ -1012,4 +1023,15 @@ self: super: builtins.intersectAttrs super { fi '' + (drv.postConfigure or ""); }) super.procex; + + # Apply a patch which hardcodes the store path of graphviz instead of using + # whatever graphviz is in PATH. + graphviz = overrideCabal (drv: { + patches = [ + (pkgs.substituteAll { + src = ./patches/graphviz-hardcode-graphviz-store-path.patch; + inherit (pkgs) graphviz; + }) + ] ++ (drv.patches or []); + }) super.graphviz; } diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 8eed7e083d60..6b8cc59e479e 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -91106,8 +91106,6 @@ self: { ]; description = "Library for producing fake data"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; - broken = true; }) {}; "fakedata_1_0_1" = callPackage @@ -91144,7 +91142,6 @@ self: { description = "Library for producing fake data"; license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; - broken = true; }) {}; "fakedata-parser" = callPackage @@ -91172,7 +91169,6 @@ self: { ]; description = "Fake a -> Gen a"; license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; }) {}; "fakefs" = callPackage @@ -128890,7 +128886,6 @@ self: { testHaskellDepends = [ base containers fakedata hedgehog ]; description = "Use 'fakedata' with 'hedgehog'"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; }) {}; "hedgehog-fn" = callPackage diff --git a/pkgs/development/haskell-modules/lib/compose.nix b/pkgs/development/haskell-modules/lib/compose.nix index d84c804272db..f19b6241f267 100644 --- a/pkgs/development/haskell-modules/lib/compose.nix +++ b/pkgs/development/haskell-modules/lib/compose.nix @@ -121,7 +121,10 @@ rec { /* doDistribute enables the distribution of binaries for the package via hydra. */ - doDistribute = overrideCabal (drv: { hydraPlatforms = drv.platforms or ["i686-linux" "x86_64-linux" "x86_64-darwin"]; }); + doDistribute = overrideCabal (drv: { + # lib.platforms.all is the default value for platforms (since GHC can cross-compile) + hydraPlatforms = drv.platforms or lib.platforms.all; + }); /* dontDistribute disables the distribution of binaries for the package via hydra. */ diff --git a/pkgs/development/haskell-modules/patches/graphviz-hardcode-graphviz-store-path.patch b/pkgs/development/haskell-modules/patches/graphviz-hardcode-graphviz-store-path.patch new file mode 100644 index 000000000000..f0331e3a2b60 --- /dev/null +++ b/pkgs/development/haskell-modules/patches/graphviz-hardcode-graphviz-store-path.patch @@ -0,0 +1,40 @@ +diff --git a/Data/GraphViz/Commands.hs b/Data/GraphViz/Commands.hs +index 20e7dbe..514c29d 100644 +--- a/Data/GraphViz/Commands.hs ++++ b/Data/GraphViz/Commands.hs +@@ -63,14 +63,14 @@ import System.IO (Handle, hPutStrLn, hSetBinaryMode, stderr) + -- ----------------------------------------------------------------------------- + + showCmd :: GraphvizCommand -> String +-showCmd Dot = "dot" +-showCmd Neato = "neato" +-showCmd TwoPi = "twopi" +-showCmd Circo = "circo" +-showCmd Fdp = "fdp" +-showCmd Sfdp = "sfdp" +-showCmd Osage = "osage" +-showCmd Patchwork = "patchwork" ++showCmd Dot = "@graphviz@/bin/dot" ++showCmd Neato = "@graphviz@/bin/neato" ++showCmd TwoPi = "@graphviz@/bin/twopi" ++showCmd Circo = "@graphviz@/bin/circo" ++showCmd Fdp = "@graphviz@/bin/fdp" ++showCmd Sfdp = "@graphviz@/bin/sfdp" ++showCmd Osage = "@graphviz@/bin/osage" ++showCmd Patchwork = "@graphviz@/bin/patchwork" + + -- | The default command for directed graphs. + dirCommand :: GraphvizCommand +@@ -312,8 +312,11 @@ runGraphvizCanvas' d = runGraphvizCanvas (commandFor d) d + + -- | Is the Graphviz suite of tools installed? This is determined by + -- whether @dot@ is available in the @PATH@. ++-- ++-- Note: With nixpkgs, this will always return 'True' as graphviz' ++-- store paths are hardcoded instead of looking at @PATH@. + isGraphvizInstalled :: IO Bool +-isGraphvizInstalled = liftM isJust . findExecutable $ showCmd Dot ++isGraphvizInstalled = pure True -- :) + + -- | If Graphviz does not seem to be available, print the provided + -- error message and then exit fatally. diff --git a/pkgs/development/haskell-modules/patches/xmonad_0_17_0-nix.patch b/pkgs/development/haskell-modules/patches/xmonad_0_17_0-nix.patch new file mode 100644 index 000000000000..e313aed69063 --- /dev/null +++ b/pkgs/development/haskell-modules/patches/xmonad_0_17_0-nix.patch @@ -0,0 +1,34 @@ +diff --git a/src/XMonad/Core.hs b/src/XMonad/Core.hs +index 46a0939..92af53d 100644 +--- a/src/XMonad/Core.hs ++++ b/src/XMonad/Core.hs +@@ -46,6 +46,7 @@ import Data.Traversable (for) + import Data.Time.Clock (UTCTime) + import Data.Default.Class + import Data.List (isInfixOf) ++import System.Environment (lookupEnv) + import System.FilePath + import System.IO + import System.Info +@@ -458,7 +459,8 @@ xfork x = io . forkProcess . finally nullStdin $ do + -- | Use @xmessage@ to show information to the user. + xmessage :: MonadIO m => String -> m () + xmessage msg = void . xfork $ do +- executeFile "xmessage" True ++ xmessageBin <- fromMaybe "xmessage" <$> liftIO (lookupEnv "XMONAD_XMESSAGE") ++ executeFile xmessageBin True + [ "-default", "okay" + , "-xrm", "*international:true" + , "-xrm", "*fontSet:-*-fixed-medium-r-normal-*-18-*-*-*-*-*-*-*,-*-fixed-*-*-*-*-18-*-*-*-*-*-*-*,-*-*-*-*-*-*-18-*-*-*-*-*-*-*" +@@ -654,8 +656,9 @@ compile dirs method = + bracket (openFile (errFileName dirs) WriteMode) hClose $ \err -> do + let run = runProc (cfgDir dirs) err + case method of +- CompileGhc -> +- run "ghc" ghcArgs ++ CompileGhc -> do ++ ghc <- fromMaybe "ghc" <$> (lookupEnv "NIX_GHC") ++ run ghc ghcArgs + CompileStackGhc stackYaml -> + run "stack" ["build", "--silent", "--stack-yaml", stackYaml] .&&. + run "stack" ("ghc" : "--stack-yaml" : stackYaml : "--" : ghcArgs) diff --git a/pkgs/development/misc/haskell/hasura/graphql-engine.nix b/pkgs/development/misc/haskell/hasura/graphql-engine.nix index ba9d1d5bf9f4..d5d8e693ab41 100644 --- a/pkgs/development/misc/haskell/hasura/graphql-engine.nix +++ b/pkgs/development/misc/haskell/hasura/graphql-engine.nix @@ -32,8 +32,8 @@ mkDerivation { version = "1.0.0"; src = fetchgit { url = "https://github.com/hasura/graphql-engine.git"; - sha256 = "0ky23f700pmzb6anx44xzh6dixixmn7kq1ypj0yy4kqiqzqdb2dg"; - rev = "7c35ffb36561214390d0d545d418746f29a29ba4"; + sha256 = "04ns40wk1760pxi18pyqzgrk8h28mw6402zkjc1g52ny6afchs05"; + rev = "8be851c2a1326b2caada13a3c43becd2e848db6c"; fetchSubmodules = true; }; postUnpack = "sourceRoot+=/server; echo source root reset to $sourceRoot"; diff --git a/pkgs/development/tools/shellcheck/default.nix b/pkgs/development/tools/shellcheck/default.nix index cf767515082e..13cfc93cfc67 100644 --- a/pkgs/development/tools/shellcheck/default.nix +++ b/pkgs/development/tools/shellcheck/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, haskellPackages, haskell, pandoc }: +{ stdenv, lib, ShellCheck, haskell, pandoc }: # this wraps around the haskell package # and puts the documentation into place @@ -15,13 +15,15 @@ let }; in drv' // { meta = meta' // overrideFn meta'; }; - bin = haskell.lib.compose.justStaticExecutables haskellPackages.ShellCheck; + bin = haskell.lib.compose.justStaticExecutables ShellCheck; shellcheck = stdenv.mkDerivation { pname = "shellcheck"; version = bin.version; - inherit (haskellPackages.ShellCheck) meta src; + inherit (ShellCheck) src; + + meta = builtins.removeAttrs ShellCheck.meta [ "hydraPlatforms" ]; nativeBuildInputs = [ pandoc ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8e5df2c2c583..03f95e34e616 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15278,7 +15278,9 @@ with pkgs; shards_0_16 shards; - shellcheck = callPackage ../development/tools/shellcheck {}; + shellcheck = callPackage ../development/tools/shellcheck { + ShellCheck = haskellPackages.ShellCheck_0_8_0; + }; shellharden = callPackage ../development/tools/shellharden {};