Skip to content

Commit

Permalink
bump for ihaskell version
Browse files Browse the repository at this point in the history
I can not get this to build with text 2.1 and ihaskell 0.11
because of conflicts with other packages, so it is not clear
if this is a useful change at this time.
  • Loading branch information
DougBurke committed Dec 26, 2023
1 parent 543db34 commit 08fea34
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 5 deletions.
6 changes: 3 additions & 3 deletions hvega/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions hvega/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
# Change the prompt to show that you are in a devShell
shellHook = ''
echo -e "*** \e[1;32mWelcome to hvega\e[0m ***"
ghc --version
cabal --version
hlint --version
echo -e ""
export PS1='hvega:\A \e[1;34m\w\e[0m '
'';
});
Expand Down
3 changes: 2 additions & 1 deletion ihaskell-hvega/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ For the latest version of this document, please see

## 0.5.0.5

Support text 2.1 (still not using this, so does it even work?).
Support text 2.1 and IHaskell 0.11 (I am still not using IHaskell
so there's no guarantee this will work).

## 0.5.0.4

Expand Down
25 changes: 25 additions & 0 deletions ihaskell-hvega/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions ihaskell-hvega/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
# inspired by: https://serokell.io/blog/practical-nix-flakes#packaging-existing-applications
description = "Allow vega visualizations to auto-display in IHaskell";
inputs.nixpkgs.url = "nixpkgs";
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" ];
# supportedSystems = [ "x86_64-linux" ];
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
nixpkgsFor = forAllSystems (system: import nixpkgs {
inherit system;
overlays = [ self.overlay ];
});
in
{
overlay = (final: prev: {
ihaskell-hvega = final.haskellPackages.callCabal2nix "ihaskell-hvega" ./. {};
hvega = final.haskellPackages.callCabal2nix "../hvega" ./. {};
});
packages = forAllSystems (system: {
# do we need to set/override both?
hvega = nixpkgsFor.${system}.hvega;
ihaskell-hvega = nixpkgsFor.${system}.ihaskell-hvega;
});
defaultPackage = forAllSystems (system: self.packages.${system}.ihaskell-hvega);
checks = self.packages;
devShell = forAllSystems (system: let haskellPackages = nixpkgsFor.${system}.haskellPackages;
in haskellPackages.shellFor {
packages = p: [self.packages.${system}.ihaskell-hvega];
withHoogle = true;
buildInputs = with haskellPackages; [
haskell-language-server
hlint
cabal-install
];
# Change the prompt to show that you are in a devShell
shellHook = ''
echo -e "*** \e[1;32mWelcome to ihaskell-hvega\e[0m ***"
ghc --version
cabal --version
hlint --version
echo -e ""
export PS1='ihaskell-hvega:\A \e[1;34m\w\e[0m '
'';
});
};
}
2 changes: 1 addition & 1 deletion ihaskell-hvega/ihaskell-hvega.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ library
build-depends: base >= 4.7 && < 5
, aeson >= 0.11 && < 2.3
, hvega < 0.13
, ihaskell >= 0.10 && < 0.11
, ihaskell >= 0.10 && < 0.12
, text >= 1.2 && < 2.2

default-language: Haskell2010
Expand Down

0 comments on commit 08fea34

Please sign in to comment.