termonad 4.0.0.0 → 4.0.0.1
raw patch · 6 files changed
+66/−50 lines, 6 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Termonad.Pcre: inline_c_ffi_6989586621679109281 :: IO CUInt
+ Termonad.Pcre: inline_c_ffi_6989586621679112868 :: IO CUInt
- Termonad.Config.Colour: lensBackgroundColour :: forall c_a2aa3. Lens' (ColourConfig c_a2aa3) (Option c_a2aa3)
+ Termonad.Config.Colour: lensBackgroundColour :: forall c_a2dZt. Lens' (ColourConfig c_a2dZt) (Option c_a2dZt)
- Termonad.Config.Colour: lensCursorBgColour :: forall c_a2aa3. Lens' (ColourConfig c_a2aa3) (Option c_a2aa3)
+ Termonad.Config.Colour: lensCursorBgColour :: forall c_a2dZt. Lens' (ColourConfig c_a2dZt) (Option c_a2dZt)
- Termonad.Config.Colour: lensCursorFgColour :: forall c_a2aa3. Lens' (ColourConfig c_a2aa3) (Option c_a2aa3)
+ Termonad.Config.Colour: lensCursorFgColour :: forall c_a2dZt. Lens' (ColourConfig c_a2dZt) (Option c_a2dZt)
- Termonad.Config.Colour: lensForegroundColour :: forall c_a2aa3. Lens' (ColourConfig c_a2aa3) (Option c_a2aa3)
+ Termonad.Config.Colour: lensForegroundColour :: forall c_a2dZt. Lens' (ColourConfig c_a2dZt) (Option c_a2dZt)
- Termonad.Config.Colour: lensPalette :: forall c_a2aa3. Lens' (ColourConfig c_a2aa3) (Palette c_a2aa3)
+ Termonad.Config.Colour: lensPalette :: forall c_a2dZt. Lens' (ColourConfig c_a2dZt) (Palette c_a2dZt)
Files
- .nix-helpers/nixpkgs.nix +45/−4
- CHANGELOG.md +8/−0
- shell.nix +2/−37
- src/Termonad/Config/Colour.hs +1/−2
- src/Termonad/Term.hs +9/−6
- termonad.cabal +1/−1
.nix-helpers/nixpkgs.nix view
@@ -13,6 +13,12 @@ , # Build all the examples bundled with termonad. Normally this is only used # in CI for testing that the examples all still compile. buildExamples ? false+, # This is only used for `termonadShell`.+ #+ # If this is `true`, Hoogle will also index the Termonad libraries,+ # however this will mean the environment will need to be rebuilt every+ # time the termonad source changes.+ indexTermonad ? false }: let@@ -20,13 +26,13 @@ if isNull nixpkgs then builtins.fetchTarball {- # Recent version of nixpkgs master as of 2020-07-01 which uses LTS-16.2.- url = "https://github.com/NixOS/nixpkgs/archive/7db146538e49ad4bee4b5c4fea073c38586df7e2.tar.gz";- sha256 = "06vhwys3rpj6grxn76n1sj14wf4hn9z8bmd2k1yhcy29cqri0xhk";+ # Recent version of nixpkgs master as of 2020-08-18 which uses LTS-16.9.+ url = "https://github.com/NixOS/nixpkgs/archive/c5815280e92112a25d958a2ec8b3704d7d90c506.tar.gz";+ sha256 = "09ic4s9s7w3lm0gmcxszm5j20cfv4n5lfvhdvgi7jzdbbbdps1nh"; } else nixpkgs; - compilerVersion = if isNull compiler then "ghc883" else compiler;+ compilerVersion = if isNull compiler then "ghc884" else compiler; # An overlay that adds termonad to all haskell package sets. haskellPackagesOverlay = self: super: {@@ -73,6 +79,41 @@ # don't need to figure out the correct compiler version to use when it is # not given by the user. termonadKnownWorkingHaskellPkgSet = self.haskell.packages.${compilerVersion};++ # This is a shell environment for hacking on Termonad with cabal. See the+ # top-level shell.nix for an explanation.+ termonadShell =+ let+ # Nix-shell environment for hacking on termonad.+ termonadEnv = self.termonadKnownWorkingHaskellPkgSet.termonad.env;++ # Build tools that are nice to have. It is okay to get Haskell build tools+ # from any Haskell package set, since they do not depend on the GHC version+ # we are using. We get these from the normal haskellPackages pkg set because+ # then they don't have to be compiled from scratch.+ convenientNativeBuildTools = [+ self.cabal-install+ self.gnome3.glade+ self.haskellPackages.ghcid+ ];+ in++ if indexTermonad+ then+ termonadEnv.overrideAttrs (oldAttrs: {+ nativeBuildInputs =+ let+ ghcEnvWithTermonad =+ self.termonadKnownWorkingHaskellPkgSet.ghcWithHoogle (hpkgs: [ hpkgs.termonad ]);+ in+ oldAttrs.nativeBuildInputs ++ convenientNativeBuildTools ++ [ ghcEnvWithTermonad ];+ })+ else+ self.termonadKnownWorkingHaskellPkgSet.shellFor {+ withHoogle = true;+ packages = hpkgs: [ hpkgs.termonad ];+ nativeBuildInputs = termonadEnv.nativeBuildInputs ++ convenientNativeBuildTools;+ }; }; in import nixpkgsSrc { overlays = [ haskellPackagesOverlay ] ++ additionalOverlays; }
CHANGELOG.md view
@@ -1,3 +1,11 @@+## 4.0.0.1++* Update Termonad to be able to be built with the latest versions of the+ haskell-gi libraries. This shouldn't affect most users building with+ `stack`. It is only used+ [currently](https://github.com/NixOS/nixpkgs/pull/95434) for building+ Termonad with packages from Nixpkgs.+ ## 4.0.0.0 * Remove the dependently typed code for specifying terminal colors.
shell.nix view
@@ -24,41 +24,6 @@ # will also index the Termonad libraries, however this will mean the environment # will need to be rebuilt every time the termonad source changes. -{ compiler ? null, indexTermonad ? false, nixpkgs ? null, additionalOverlays ? [] }:--with (import .nix-helpers/nixpkgs.nix { inherit compiler nixpkgs additionalOverlays; });--let- # A Haskell package set for a version of GHC that is known working.- haskPkgSet = termonadKnownWorkingHaskellPkgSet;-- # Nix-shell environment for hacking on termonad.- termonadEnv = haskPkgSet.termonad.env;-- # Build tools that are nice to have. It is okay to get Haskell build tools- # from any Haskell package set, since they do not depend on the GHC version- # we are using. We get these from the normal haskellPackages pkg set because- # then they don't have to be compiled from scratch.- nativeBuildTools = [- cabal-install- gnome3.glade- haskellPackages.ghcid- ];-in+{ compiler ? null, indexTermonad ? false, nixpkgs ? null, additionalOverlays ? [] }@args: -if indexTermonad- then- termonadEnv.overrideAttrs (oldAttrs: {- nativeBuildInputs =- let- ghcEnvWithTermonad =- haskPkgSet.ghcWithHoogle (hpkgs: [ hpkgs.termonad ]);- in- oldAttrs.nativeBuildInputs ++ nativeBuildTools ++ [ ghcEnvWithTermonad ];- })- else- haskPkgSet.shellFor {- withHoogle = true;- packages = hpkgs: [ hpkgs.termonad ];- nativeBuildInputs = termonadEnv.nativeBuildInputs ++ nativeBuildTools;- }+(import .nix-helpers/nixpkgs.nix args).termonadShell
src/Termonad/Config/Colour.hs view
@@ -295,8 +295,7 @@ unsafeMkMatrix xs = case mkMatrix xs of Just xs' -> xs'- Nothing -> error "Matrix must be 6x6x6"- Nothing ->+ Nothing -> error $ "unsafeMkMatrix: input list must be exactly 6x6x6"
src/Termonad/Term.hs view
@@ -19,15 +19,16 @@ ) import GI.Gdk.Constants (pattern BUTTON_SECONDARY) import GI.Gio- ( menuAppend+ ( Cancellable+ , menuAppend , menuNew- , noCancellable ) import GI.GLib ( SpawnFlags(SpawnFlagsDefault) ) import GI.Gtk- ( Align(AlignFill)+ ( Adjustment+ , Align(AlignFill) , ApplicationWindow , Box , Button@@ -55,7 +56,6 @@ , menuAttachToWidget , menuNewFromModel , menuPopupAtPointer- , noAdjustment , notebookAppendPage , notebookDetachTab , notebookGetNPages@@ -254,7 +254,10 @@ let showScrollbarVal = tmState ^. lensTMStateConfig . lensOptions . lensShowScrollbar vScrollbarPolicy = showScrollbarToPolicy showScrollbarVal- scrolledWin <- scrolledWindowNew noAdjustment noAdjustment+ scrolledWin <-+ scrolledWindowNew+ (Nothing :: Maybe Adjustment)+ (Nothing :: Maybe Adjustment) widgetShow scrolledWin scrolledWindowSetPolicy scrolledWin PolicyTypeAutomatic vScrollbarPolicy pure scrolledWin@@ -370,7 +373,7 @@ Nothing ([SpawnFlagsDefault] :: [SpawnFlags]) Nothing- noCancellable+ (Nothing :: Maybe Cancellable) pure (fromIntegral shellPid) -- | Add a page to the notebook and switch to it.
termonad.cabal view
@@ -1,5 +1,5 @@ name: termonad-version: 4.0.0.0+version: 4.0.0.1 synopsis: Terminal emulator configurable in Haskell description: Please see <https://github.com/cdepillabout/termonad#readme README.md>. homepage: https://github.com/cdepillabout/termonad