Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed syntax errors in ihaskell wrapper #91640

Merged
merged 1 commit into from Jul 3, 2020
Merged

Conversation

sarahzrf
Copy link
Contributor

Motivation for this change

The current ihaskell packaging is producing a broken shell script.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@cdepillabout
Copy link
Member

@sarahzrf How can I reproduce the problem that this PR fixes? And then, how can I run ihaskell to make sure that the problem is fixed with this patch?

@sarahzrf
Copy link
Contributor Author

Try using nix-shell in a directory with the following shell.nix:

{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc883" }:
let unbreak = nixpkgs.haskell.lib.markUnbroken;
    hs = nixpkgs.haskell.packages.${compiler}.override {overrides = self: super: {
      ihaskell = unbreak super.ihaskell;
      ihaskell-blaze = unbreak super.ihaskell-blaze;
      ihaskell-display = unbreak super.ihaskell-display;
      ihaskell-diagrams = unbreak super.ihaskell-diagrams;
    };};
    packages = hp: with hp; [];
    ihaskell = nixpkgs.ihaskell.override {inherit (hs) ghcWithPackages; inherit packages;};
in nixpkgs.stdenv.mkDerivation {
  name = "env";
  buildInputs = [nixpkgs.glibcLocales ihaskell];
}

Then attempt to run ihaskell-notebook, and you should see an error like

/nix/store/8g24wvk11y9ycly9p2g5xjm98ffzqkpk-ihaskell-with-packages/bin/.ihaskell-notebook-wrapped: line 3: unexpected EOF while looking for matching `"'
/nix/store/8g24wvk11y9ycly9p2g5xjm98ffzqkpk-ihaskell-with-packages/bin/.ihaskell-notebook-wrapped: line 5: syntax error: unexpected end of file

@sarahzrf
Copy link
Contributor Author

The breakage seems to have been introduced in e20f308, although the single quotes around the : in PATH seem to have been there since 43a62b6. Still, I'm pretty sure the latter is wrong too.

@cdepillabout
Copy link
Member

@sarahzrf Do you want to unbreak the various ihaskell packages in this PR as well? If so, can you rebase this on the haskell-updates branch?

@sarahzrf
Copy link
Contributor Author

I'm not entirely confident in how actually non-broken they are—I've had all kinds of horrible issues trying to get various ihaskell things working before :\

@cdepillabout
Copy link
Member

As long as they all build and you're able to successfully run them, that should be enough for now.

If someone comes along and figures out that there is some bug with them, then we can potentially mark them as broken again, but until that time I think marking them as unbroken is probably the way to go.

@peti peti merged commit 6ab9c60 into NixOS:master Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants