diff options
author | Ben Sima <ben@bsima.me> | 2024-05-03 22:34:10 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2024-05-09 21:38:52 -0400 |
commit | d71c6f8c5955e8a9861e3f3957b293a369aac954 (patch) | |
tree | da77bbbec8e082a77c0d553cf2216dce9b4ced0b /Biz/Bild | |
parent | d36b4360c9c359e6eea480b39e9699b1deae70f1 (diff) |
Switch to nixpkgs-23.11, ghc 9.6.3
This brings a bunch of improvements. I got rid of some custom packages, I can
now build exllama without using a non-default cuda version. Oh yeah and I get to
use GHC 9.6.2 now, a huge upgrade from 9.4. Unfortunately I also updated ormolu
and some unrelated formatting changed, but that's life I guess.
Diffstat (limited to 'Biz/Bild')
-rw-r--r-- | Biz/Bild/Builder.nix | 2 | ||||
-rw-r--r-- | Biz/Bild/Constants.nix | 2 | ||||
-rw-r--r-- | Biz/Bild/Deps.hs | 14 | ||||
-rw-r--r-- | Biz/Bild/Deps/Haskell.nix | 3 | ||||
-rw-r--r-- | Biz/Bild/Deps/exllama.nix | 3 | ||||
-rw-r--r-- | Biz/Bild/Haskell.nix | 40 | ||||
-rw-r--r-- | Biz/Bild/Meta.hs | 2 | ||||
-rw-r--r-- | Biz/Bild/Nixpkgs.nix | 25 | ||||
-rw-r--r-- | Biz/Bild/Python.nix | 8 | ||||
-rw-r--r-- | Biz/Bild/Sources.json | 24 |
10 files changed, 45 insertions, 78 deletions
diff --git a/Biz/Bild/Builder.nix b/Biz/Bild/Builder.nix index 1a2460a..cf4d1e0 100644 --- a/Biz/Bild/Builder.nix +++ b/Biz/Bild/Builder.nix @@ -109,7 +109,7 @@ let inherit name src CODEROOT; propagatedBuildInputs = langdeps_ ++ sysdeps_; buildInputs = sysdeps_; - nativeCheckInputs = lib.attrsets.attrVals [ "mypy" "ruff" ] pkgs; + nativeCheckInputs = [ pkgs.ruff python.packages.mypy ]; checkPhase = '' check() { $@ || { echo "fail: $name: $3"; exit 1; } diff --git a/Biz/Bild/Constants.nix b/Biz/Bild/Constants.nix index 35fd880..20c992e 100644 --- a/Biz/Bild/Constants.nix +++ b/Biz/Bild/Constants.nix @@ -1 +1 @@ -{ ghcCompiler = "ghc924"; } +{ ghcCompiler = "ghc948"; } diff --git a/Biz/Bild/Deps.hs b/Biz/Bild/Deps.hs index 08e3ee6..0b57a4f 100644 --- a/Biz/Bild/Deps.hs +++ b/Biz/Bild/Deps.hs @@ -50,7 +50,7 @@ getFindSourcesJson = do root <- li <| getEnv "CODEROOT" pure <| AtPath <| root </> "Biz/Bild/Sources.json" -li :: MonadIO io => IO a -> io a +li :: (MonadIO io) => IO a -> io a li = liftIO main :: IO () @@ -391,7 +391,7 @@ cmdShow = \case sources <- unSources </ li (getSources fsj) forWithKeyM_ sources <| showPackage -showPackage :: MonadIO io => PackageName -> PackageSpec -> io () +showPackage :: (MonadIO io) => PackageName -> PackageSpec -> io () showPackage (PackageName pname) (PackageSpec spec) = do tsay <| tbold pname forM_ (KM.toList spec) <| \(attrName, attrValValue) -> do @@ -684,8 +684,8 @@ abortUpdateFailed errs = abort <| T.unlines <| ["One or more packages failed to update:"] - <> map - ( \(PackageName pname, e) -> - pname <> ": " <> tshow e - ) - errs + <> map + ( \(PackageName pname, e) -> + pname <> ": " <> tshow e + ) + errs diff --git a/Biz/Bild/Deps/Haskell.nix b/Biz/Bild/Deps/Haskell.nix index f34bfab..8115688 100644 --- a/Biz/Bild/Deps/Haskell.nix +++ b/Biz/Bild/Deps/Haskell.nix @@ -23,7 +23,6 @@ "fast-logger" "filepath" "github" - "hashids" "haskeline" "hostname" "http-types" @@ -31,7 +30,6 @@ "katip" "lucid" "monad-logger" - "monad-metrics" "mtl" "neat-interpolation" "network-uri" @@ -53,7 +51,6 @@ "servant-server" "split" "stm" - "stripe-haskell" "tasty" "tasty-hunit" "tasty-quickcheck" diff --git a/Biz/Bild/Deps/exllama.nix b/Biz/Bild/Deps/exllama.nix index 51a05e9..434e9a9 100644 --- a/Biz/Bild/Deps/exllama.nix +++ b/Biz/Bild/Deps/exllama.nix @@ -1,7 +1,7 @@ { lib, sources, buildPythonPackage, pythonOlder , torch # tested on 2.0.1 and 2.1.0 (nightly) with cu118 , safetensors, sentencepiece, ninja, cudaPackages, addOpenGLRunpath, which -, gcc11 # cuda 11.7 requires g++ <12 +, libGL, gcc11 # cuda 11.7 requires g++ <12 }: buildPythonPackage rec { @@ -23,6 +23,7 @@ buildPythonPackage rec { nativeBuildInputs = [ gcc11 which + libGL addOpenGLRunpath cudaPackages.cuda_nvcc cudaPackages.cuda_cudart diff --git a/Biz/Bild/Haskell.nix b/Biz/Bild/Haskell.nix index 2c0529a..c744848 100644 --- a/Biz/Bild/Haskell.nix +++ b/Biz/Bild/Haskell.nix @@ -1,11 +1,10 @@ _self: super: let - ghcCompiler = "ghc924"; + inherit (import ./Constants.nix) ghcCompiler; + buildCabal = sel: name: sel.callCabal2nix name super.sources.${name} { }; - buildCabalSubdir = sel: - { name, src ? super.sources.${name}, subdir ? name }: - sel.callCabal2nix name (src + "/${subdir}") { }; + in rec { haskell = super.haskell // { @@ -15,30 +14,23 @@ in rec { overrides = with super.pkgs.haskell.lib; sel: sup: super.overridePinnedDeps (buildCabal sel) // { - acid-state = - dontCheck sup.acid-state; # mac: "too many open files" + ap-normalize = dontCheck sup.ap-normalize; clay = doJailbreak sup.clay; - envy = doJailbreak sup.envy; - fast-tags = - sup.fast-tags.overrideAttrs (old: old // { patches = [ ]; }); - generic-data = dontCheck - sup.generic-data; # https://github.com/Lysxia/generic-data/issues/56 - readable = - doJailbreak sup.readable; # why is this even being built? - servant-auth = doJailbreak (buildCabalSubdir sel { - name = "servant-auth"; - subdir = "servant-auth/servant-auth"; - }); - servant-server = doJailbreak sup.servant-server; - stripe-core = doJailbreak sup.stripe-core; - stripe-haskell = dontCheck sup.stripe-haskell; - stripe-http-client = - doJailbreak (dontCheck sup.stripe-http-client); - temporary = dontCheck sup.temporary; - wai-middleware-metrics = dontCheck sup.wai-middleware-metrics; + cmark = doJailbreak sup.cmark; + docopt = buildCabal sel "docopt"; + linear-generics = doJailbreak sup.linear-generics; + req = doJailbreak sup.req; + servant-auth = doJailbreak sup.servant-auth; + servant-auth-server = dontCheck sup.servant-auth-server; + shellcheck = doJailbreak sup.shellcheck; + string-qq = doJailbreak sup.string-qq; + syb-with-class = doJailbreak sup.syb-with-class; + th-abstraction = doJailbreak sup.th-abstraction; }; }); }; }; + ormolu = super.haskellPackages.ormolu; + } diff --git a/Biz/Bild/Meta.hs b/Biz/Bild/Meta.hs index ad5fdd6..0025d94 100644 --- a/Biz/Bild/Meta.hs +++ b/Biz/Bild/Meta.hs @@ -47,7 +47,7 @@ data Parsed = Parsed prun :: Set Run } -detect :: Ord a => Regex.RE Char a -> [Text] -> Set a +detect :: (Ord a) => Regex.RE Char a -> [Text] -> Set a detect m cl = cl /> Text.unpack diff --git a/Biz/Bild/Nixpkgs.nix b/Biz/Bild/Nixpkgs.nix index 3de56c4..8bc9cad 100644 --- a/Biz/Bild/Nixpkgs.nix +++ b/Biz/Bild/Nixpkgs.nix @@ -11,41 +11,34 @@ let system = __currentSystem; + # override pinned deps with our sources, this must come before other + # package overlays, because of the 'null' from 'overrideSource' + depsOverlay = _: pkgs: pkgs.overridePinnedDeps pkgs.overrideSource; + in { - nixos-23_05 = import sources.nixos-23_05 { + nixos-23_11 = import sources.nixos-23_11 { inherit system config; overlays = [ (_: _: { inherit sources; }) (import ./CcacheWrapper.nix) (import ./Functions.nix) - - # override pinned deps with our sources, this must come before other - # package overlays, because of the 'null' from 'overrideSource' - (_: pkgs: pkgs.overridePinnedDeps pkgs.overrideSource) - + depsOverlay (import ./Deps.nix) (import ./Python.nix) (import ./Haskell.nix) ]; }; - nixos-23_11 = import sources.nixos-23_11 { - inherit system config; - overlays = [ - (_: _: { inherit sources; }) - (import ./CcacheWrapper.nix) - (import ./Functions.nix) - (import ./Deps.nix) - ]; - }; - nixos-unstable-small = import sources.nixos-unstable-small { inherit system config; overlays = [ (_: _: { inherit sources; }) (import ./CcacheWrapper.nix) (import ./Functions.nix) + depsOverlay (import ./Deps.nix) + (import ./Python.nix) + (import ./Haskell.nix) ]; }; diff --git a/Biz/Bild/Python.nix b/Biz/Bild/Python.nix index 51f35f1..5569352 100644 --- a/Biz/Bild/Python.nix +++ b/Biz/Bild/Python.nix @@ -4,12 +4,8 @@ _self: super: { with pysuper.pkgs.python3Packages; let dontCheck = p: p.overridePythonAttrs (_: { doCheck = false; }); in { - exllama = callPackage ./Deps/exllama.nix { - cudaPackages = super.pkgs.cudaPackages_11_7; - }; - exllamav2 = callPackage ./Deps/exllamav2.nix { - cudaPackages = super.pkgs.cudaPackages_11_7; - }; + exllama = callPackage ./Deps/exllama.nix { }; + exllamav2 = callPackage ./Deps/exllamav2.nix { }; interegular = callPackage ./Deps/interegular.nix { }; mypy = dontCheck pysuper.mypy; outlines = callPackage ./Deps/outlines.nix { }; diff --git a/Biz/Bild/Sources.json b/Biz/Bild/Sources.json index ed6b096..40bcdfb 100644 --- a/Biz/Bild/Sources.json +++ b/Biz/Bild/Sources.json @@ -13,16 +13,17 @@ "version": "cc7729b1b42a79e261091ff7835f7fc2a7ae3cee" }, "docopt": { - "branch": "master", + "branch": "main", "description": "A command-line interface description language and parser that will make you smile", "homepage": "http://docopt.org/", "owner": "docopt", "repo": "docopt.hs", - "rev": "cdd32227eaff46fb57330ced96d5c290cbd9e035", - "sha256": "1nfbm7fpmk522n58d52m44y86a7z4nm6gc3m3gc1hb3wac6vmffc", + "rev": "47516acafeae3e1fdc447716e6ea05c2b918ff3a", + "sha256": "07skrfhzx51yn4qvig3ps34qra9s5g6m4k2z42h9ys0ypyk2wf8w", "type": "tarball", - "url": "https://github.com/docopt/docopt.hs/archive/cdd32227eaff46fb57330ced96d5c290cbd9e035.tar.gz", - "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" + "url": "https://github.com/docopt/docopt.hs/archive/47516acafeae3e1fdc447716e6ea05c2b918ff3a.tar.gz", + "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz", + "version": "0.7.0.8" }, "exllama": { "branch": "master", @@ -194,18 +195,5 @@ "url": "https://github.com/feuerbach/regex-applicative/archive/449519c38e65753345e9a008362c011cb7a0a4d9.tar.gz", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz", "version": "0.3.4" - }, - "servant-auth": { - "branch": "master", - "description": null, - "homepage": null, - "owner": "haskell-servant", - "repo": "servant", - "rev": "f0e2316895ee5fda52ba9d5b2b7e10f8a80a9019", - "sha256": "0ndan9zxvg5zvrl42zvppc9vhbn5skgsyqyxp2v685h82lfz74ps", - "type": "tarball", - "url": "https://github.com/haskell-servant/servant/archive/f0e2316895ee5fda52ba9d5b2b7e10f8a80a9019.tar.gz", - "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz", - "version": "0.4.0.0" } } |