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

emanote: init at 0.8.0.0 #199442

Merged
merged 1 commit into from
Nov 5, 2022
Merged

emanote: init at 0.8.0.0 #199442

merged 1 commit into from
Nov 5, 2022

Conversation

maralorn
Copy link
Member

@maralorn maralorn commented Nov 4, 2022

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@maralorn
Copy link
Member Author

maralorn commented Nov 4, 2022

Fun fact: For testing this I started emanote in the nixpkgs root, because that‘s where I had the build result. And that actually proved quite useful and I could read the nixpkgs docs via the emanote webserver.

Anyway, @srid I am a bet weary about the tailwindcss overrides. I have just copied them, but do you maybe have a bit of documentation for why those are needed. I looked for that in the tailwind README on hackage. I don‘t like the idea, that this is bespoke knowledge only present in your flake and nixpkgs.

Besides that I haven‘t done anything about M1, yet.

@maralorn maralorn marked this pull request as ready for review November 4, 2022 02:24
@maralorn maralorn mentioned this pull request Nov 4, 2022
20 tasks
Copy link
Contributor

@srid srid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

I assume if I use emanote as a Haskell dependency in .cabal, all of this configuration (tailwind, stork dependency) apply there as well?

plugins = [
pkgs.nodePackages."@tailwindcss/aspect-ratio"
pkgs.nodePackages."@tailwindcss/forms"
pkgs.nodePackages."@tailwindcss/language-server"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove "@tailwindcss/language-server". But the other plugins are generally used. Pretty much anything you can use in the Emanote HTML templates as a user can be added here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, @srid I am a bet weary about the tailwindcss overrides. I have just copied them, but do you maybe have a bit of documentation for why those are needed. I looked for that in the tailwind README on hackage. I don‘t like the idea, that this is bespoke knowledge only present in your flake and nixpkgs.

I should probably expand the README of https://github.com/srid/tailwind-haskell .... but since tailwind Haskell package is responsible for mainly compiling the classes to produce a final .css, I would say depending on all plugins that are useful in that compilation step is what is relevant. That means (AFAIU) all the plugins here except langauge-server.

@srid
Copy link
Contributor

srid commented Nov 4, 2022

Besides that I haven‘t done anything about M1, yet.

I believe it should just work.

EDIT: For intel mac (which I do not own to test), we want to remove the "broken" flag for pkgs.stork.

@srid

This comment was marked as outdated.

@srid
Copy link
Contributor

srid commented Nov 4, 2022

http2-3.0.3.drv' failed with exit code 1;

Okay, it worked on M1 on the second run. Looks like the http2 test is unreliable.

@maralorn
Copy link
Member Author

maralorn commented Nov 5, 2022

I think the stork problem on M1 is kinda orthogonal to this PR. I cannot test or verify it. I invite someone with darwin stakes to mark it unbroken.

@maralorn maralorn merged commit 693e11d into NixOS:haskell-updates Nov 5, 2022
@maralorn maralorn deleted the emanote branch November 5, 2022 00:04
@edrex
Copy link
Contributor

edrex commented Nov 5, 2022

Tested emanote, seems to work. The closure size is still enormous, but I guess that's generally the case with Haskell executables?

[nix-shell:~/wiki]$ nix path-info -S $(which emanote)
/nix/store/5x70pgpmbclxr4hg3npyr2lh8ml0blb8-emanote-0.8.0.0	5650489336

@srid
Copy link
Contributor

srid commented Nov 5, 2022

The closure size is still enormous

Yea, do we know what the standard practice on nixpkgs is to reduce the size of final Haskell packages (in pkgs.*)? I've used remove-references-to in the past but that's a somewhat manual process.

cf. srid/emanote#295

@maralorn
Copy link
Member Author

maralorn commented Nov 5, 2022

Ah, yeah, we should probably add the remove-references-to.

@srid
Copy link
Contributor

srid commented Nov 6, 2022

FWIW, this is what I did for neuron:

          remove-references-to -t ${self.pandoc-types} $out/bin/neuron
          remove-references-to -t ${self.warp} $out/bin/neuron
          remove-references-to -t ${self.HTTP} $out/bin/neuron
          remove-references-to -t ${self.js-jquery} $out/bin/neuron
          remove-references-to -t ${self.js-dgtable} $out/bin/neuron
          remove-references-to -t ${self.js-flot} $out/bin/neuron

@edrex
Copy link
Contributor

edrex commented Nov 7, 2022

Honestly, the closure size for nix builds of emanote have been blocking me from deploying it for awhile, so it would be amazing if
we could get it optimized. If you don't have time to get to it for awhile @maralorn just let me know and I can make a patch.

@edrex
Copy link
Contributor

edrex commented Nov 7, 2022

and.. thanks for your work on this

@maralorn
Copy link
Member Author

maralorn commented Nov 7, 2022

@edrex I would very much welcome your help! Would especially nice to get this in before branch-off on the 21st.

@edrex
Copy link
Contributor

edrex commented Nov 8, 2022

Ok, I'll follow up with a PR when i have a draft.

@edrex
Copy link
Contributor

edrex commented Nov 29, 2022

I dropped the ball on this and missed the branch-off window - been working more with a hammer than a keyboard these past weeks. Still top of queue for nix stuff.

@maralorn
Copy link
Member Author

No worries. We can also always do a backport for this. So no meet to worry about branch off.

@srid
Copy link
Contributor

srid commented Nov 29, 2022

Emanote 0.8.2 will also be soon released (with these changes) marking the official public initial release. So there is another opportunity, @edrex

EDIT: Maybe I should call it 1.0.

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.

3 participants