From ee0991a68661ef55a6a54cdc5e56a4451f6d575c Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Thu, 19 Oct 2023 13:00:46 +0200 Subject: [PATCH] Update scientific.nix and add haskell-language-server to shell --- scientific.nix | 23 +++++++++++------------ shell.nix | 13 +++++++++---- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/scientific.nix b/scientific.nix index d0ab358..1f87de1 100644 --- a/scientific.nix +++ b/scientific.nix @@ -1,23 +1,22 @@ -{ mkDerivation, base, binary, bytestring, containers, deepseq -, hashable, integer-gmp, integer-logarithms, QuickCheck, smallcheck, stdenv, tasty -, tasty-ant-xml, tasty-hunit, tasty-quickcheck, tasty-smallcheck -, text, primitive, criterion +{ mkDerivation, base, binary, bytestring, containers, criterion +, deepseq, hashable, integer-logarithms, lib, primitive, QuickCheck +, smallcheck, tasty, tasty-hunit, tasty-quickcheck +, tasty-smallcheck, text }: mkDerivation { pname = "scientific"; - version = "HEAD"; + version = "0.3.7.0"; src = ./.; libraryHaskellDepends = [ - base binary bytestring containers deepseq hashable integer-gmp - integer-logarithms text primitive + base binary bytestring containers deepseq hashable + integer-logarithms primitive text ]; testHaskellDepends = [ - base bytestring QuickCheck smallcheck tasty tasty-ant-xml - tasty-hunit tasty-quickcheck tasty-smallcheck text - - criterion + base binary bytestring QuickCheck smallcheck tasty tasty-hunit + tasty-quickcheck tasty-smallcheck text ]; + benchmarkHaskellDepends = [ base criterion ]; homepage = "https://github.com/basvandijk/scientific"; description = "Numbers represented using scientific notation"; - license = stdenv.lib.licenses.bsd3; + license = lib.licenses.bsd3; } diff --git a/shell.nix b/shell.nix index 5e43691..9f07a15 100644 --- a/shell.nix +++ b/shell.nix @@ -8,8 +8,13 @@ let then pkgs.haskellPackages else pkgs.haskell.packages.${compiler}; - drv = haskellPackages.callPackage (import ./scientific.nix) {}; - in - - if pkgs.lib.inNixShell then drv.env else drv + haskellPackages.shellFor { + packages = hpkgs: [ + (hpkgs.callPackage (import ./scientific.nix) {}) + ]; + nativeBuildInputs = [ + pkgs.haskell-language-server + pkgs.cabal-install + ]; + }