diff options
author | sterni <sternenseemann@systemli.org> | 2021-03-26T00·51+0100 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2021-03-26T01·46+0000 |
commit | a040c55d35e41e99c4d6ed95483a7697e14ebdf5 (patch) | |
tree | 32d0c984bce73eb372a30b76a25976a9fab7c3f3 | |
parent | 3a49e4f4bf23ab2c2bc59a7574cb8dfe2f07067d (diff) |
chore(users/gs/owothia): remove unnecessary overrides, simplify r/2331
* chatter and its dependencies have been fixed in upstream haskellPackages, so we can get rid of the packageSet.nix expression: https://github.com/NixOS/nixpkgs/pull/116803 * Merged default.nix and pkg.nix into one expression and use callCabal2nix instead of emulating it with nested imports. * Minor refactor of shell.nix and remove haskell-language-server until we've redone it or replaced it with the upstream one as now the GHC versions are out of sync: hls is built with 8.8.4, but haskellPackages uses 8.10.4 Change-Id: Ie75eaa93ba8bd79e749e2442fb28c855b8a15a1d Reviewed-on: https://cl.tvl.fyi/c/depot/+/2661 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
-rw-r--r-- | users/glittershark/owothia/default.nix | 8 | ||||
-rw-r--r-- | users/glittershark/owothia/packageSet.nix | 22 | ||||
-rw-r--r-- | users/glittershark/owothia/pkg.nix | 6 | ||||
-rw-r--r-- | users/glittershark/owothia/shell.nix | 21 |
4 files changed, 18 insertions, 39 deletions
diff --git a/users/glittershark/owothia/default.nix b/users/glittershark/owothia/default.nix index 2a1b37800b0d..171bb3668956 100644 --- a/users/glittershark/owothia/default.nix +++ b/users/glittershark/owothia/default.nix @@ -1,6 +1,4 @@ -{ pkgs ? (import ../../../. {}).third_party -, lib ? pkgs.lib -, ... -}: +{ pkgs ? (import ../../../. {}).third_party, ... }: -(import ./packageSet.nix {}).callPackage (import ./pkg.nix { inherit pkgs; }) {} +pkgs.haskellPackages.callCabal2nix "owothia" + (pkgs.gitignoreSource ./.) { } diff --git a/users/glittershark/owothia/packageSet.nix b/users/glittershark/owothia/packageSet.nix deleted file mode 100644 index b4742b6ae624..000000000000 --- a/users/glittershark/owothia/packageSet.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ pkgs ? (import ../../../. {}).third_party, ... }: - -let - - hlib = pkgs.haskell.lib; - -in - -# overlay can be removed when this is in our pin: -# https://github.com/NixOS/nixpkgs/pull/116803 -pkgs.haskellPackages.extend (self: super: { - regex-tdfa-text = hlib.doJailbreak - (hlib.appendPatch - super.regex-tdfa-text - ./regex-tdfa-text.patch - ); - - fullstop = hlib.dontCheck super.fullstop; - - chatter = hlib.doJailbreak - (hlib.dontCheck (hlib.appendPatch super.chatter ./chatter.patch)); -}) diff --git a/users/glittershark/owothia/pkg.nix b/users/glittershark/owothia/pkg.nix deleted file mode 100644 index ef99d4d6518f..000000000000 --- a/users/glittershark/owothia/pkg.nix +++ /dev/null @@ -1,6 +0,0 @@ -args@{ pkgs ? (import ../../../. {}).third_party }: - -import ((import ./packageSet.nix args).haskellSrc2nix { - name = "owothia"; - src = pkgs.gitignoreSource ./.; -}) diff --git a/users/glittershark/owothia/shell.nix b/users/glittershark/owothia/shell.nix index 53971c97bd36..4a89fa0a5d7e 100644 --- a/users/glittershark/owothia/shell.nix +++ b/users/glittershark/owothia/shell.nix @@ -1,14 +1,23 @@ -args@{ pkgs ? (import ../../../. {}).third_party, ... }: +{ pkgs ? (import ../../../. {}).third_party, ... }: -((import ./packageSet.nix args).extend (pkgs.haskell.lib.packageSourceOverrides { - owothia = pkgs.gitignoreSource ./.; +let + inherit (pkgs) + haskellPackages + haskell + gitignoreSource + ; +in + +(haskellPackages.extend (haskell.lib.packageSourceOverrides { + owothia = gitignoreSource ./.; })).shellFor { - packages = p: [p.owothia]; + packages = p: [ p.owothia ]; withHoogle = true; doBenchmark = true; - buildInputs = with pkgs.haskellPackages; [ + buildInputs = with haskellPackages; [ cabal-install hlint - pkgs.haskell-language-server.ghc884 + # TODO(sterni): versions out of sync + # pkgs.haskell-language-server.ghc884 ]; } |