summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/configuration-nix.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-nix.nix')
-rw-r--r--pkgs/development/haskell-modules/configuration-nix.nix18
1 files changed, 10 insertions, 8 deletions
diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix
index 6de0149a998..22e08135459 100644
--- a/pkgs/development/haskell-modules/configuration-nix.nix
+++ b/pkgs/development/haskell-modules/configuration-nix.nix
@@ -708,14 +708,7 @@ self: super: builtins.intersectAttrs super {
   };
 
   haskell-language-server = overrideCabal super.haskell-language-server (drv: {
-    postInstall = let
-      inherit (pkgs.lib) concatStringsSep take splitString;
-      ghc_version = self.ghc.version;
-      ghc_major_version = concatStringsSep "." (take 2 (splitString "." ghc_version));
-    in ''
-        ln -s $out/bin/haskell-language-server $out/bin/haskell-language-server-${ghc_version}
-        ln -s $out/bin/haskell-language-server $out/bin/haskell-language-server-${ghc_major_version}
-       '';
+    postInstall = "ln -s $out/bin/haskell-language-server $out/bin/haskell-language-server-${self.ghc.version}";
     testToolDepends = [ self.cabal-install pkgs.git ];
     testTarget = "func-test"; # wrapper test accesses internet
     preCheck = ''
@@ -932,6 +925,8 @@ self: super: builtins.intersectAttrs super {
   # Runtime dependencies and CLI completion
   nvfetcher = generateOptparseApplicativeCompletion "nvfetcher" (overrideCabal
     super.nvfetcher (drv: {
+      # test needs network
+      doCheck = false;
       buildTools = drv.buildTools or [ ] ++ [ pkgs.buildPackages.makeWrapper ];
       postInstall = drv.postInstall or "" + ''
         wrapProgram "$out/bin/nvfetcher" --prefix 'PATH' ':' "${
@@ -978,4 +973,11 @@ self: super: builtins.intersectAttrs super {
   # Test suite is just the default example executable which doesn't work if not
   # executed by Setup.hs, but works if started on a proper TTY
   isocline = dontCheck super.isocline;
+
+  # Some hash implementations are x86 only, but part of the test suite.
+  # So executing and building it on non-x86 platforms will always fail.
+  hashes = overrideCabal super.hashes {
+    doCheck = with pkgs.stdenv; hostPlatform == buildPlatform
+      && buildPlatform.isx86;
+  };
 }