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

nixnote2: init at 2.0.2 #35217

Merged
merged 1 commit into from Feb 23, 2018
Merged

nixnote2: init at 2.0.2 #35217

merged 1 commit into from Feb 23, 2018

Conversation

htr
Copy link
Contributor

@htr htr commented Feb 20, 2018

Motivation for this change

Adds nixnote: an Evernote clone for linux

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@dtzWill
Copy link
Member

dtzWill commented Feb 20, 2018

I'm kinda disappointed this isn't a utility for storing notes in the Nix store (for some reason that is wonderful, I'm sure!)... :P

@dtzWill
Copy link
Member

dtzWill commented Feb 20, 2018

@GrahamcOfBorg build nixnote

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘nixnote-2.0.2’ in /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/applications/misc/nixnote/default.nix:31 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

@dtzWill
Copy link
Member

dtzWill commented Feb 20, 2018

I honestly am unsure, should this perhaps be called "nixnote2" instead? Upstream maybe prefers that it looks like, but split on repology.org is 4 and 4: https://repology.org/metapackages/?search=nixnote .

Only brought it up once saw the installed binary was called "nixnote2".

@htr
Copy link
Contributor Author

htr commented Feb 20, 2018

TIL about repology.org :)

good point, I'll rename it: even if it is a 4/4 on repology, the most relevant distros (IMO) adopted nixnote2.

@dtzWill
Copy link
Member

dtzWill commented Feb 20, 2018

Thanks for iterating on this, sorry for all the one-at-a-time comments!

This builds and seems to work at a glance, although I don't have an evernote account. (Yet? This app does look neat....)

Poking a bit it seems upstream's install rule leaves a lot to be desired:

  • The ".desktop" refers to an icon that isn't installed (would be in /share/pixmaps/nixnote2.png)
  • The "about" page says VERSION instead of the right version
  • Themes are not available, presumably we need to copy over theme.ini?
  • (only mention because I see this in the script below) man page not installed

In particular there are various scripts for installation and packaging, this one for example seems to have steps to address each of the above and a number of other things that may or may not be needed/useful:

https://github.com/baumgarr/nixnote2/blob/master/package_scripts/copy_files.sh#L56

Since hunspell is a dep--does spell checking work? Not sure if that's usually automatic or if something more is needed.

Hmm, not sure how to best handle these things reasonably cleanly. Can you look at this a bit?
If it's too difficult we can do something like copy the most important steps into a postInstall or something...


FWIW, here's what Arch does: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=nixnote2
(which at a glance addresses the theme.ini installation but all of the above issues, although I don't know).

I link it to point out that they're doing something re:plugins and optional webcam support? I wouldn't worry about webcam support unless that was important to you, but thought I'd bring it to your attention in case that's something you would like :).

@htr
Copy link
Contributor Author

htr commented Feb 20, 2018

thanks for taking a look!
My launcher is dmenu, so usually I don't notice some of those details.

hunspell is a build dep required even when the hunspell plugin is not built.

I'll tweak some knobs later!

@dtzWill
Copy link
Member

dtzWill commented Feb 20, 2018

You've done a great job, don't mean to be a nag. I definitely don't think plugins are a priority!

@AMDmi3
Copy link
Contributor

AMDmi3 commented Feb 21, 2018

good point, I'll rename it: even if it is a 4/4 on repology, the most relevant distros (IMO) adopted nixnote2.

Agreed, I'll merge it into single nixnote2 on repology as well.

@fpletz
Copy link
Member

fpletz commented Feb 23, 2018

@GrahamcOfBorg build nixnote2

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘nixnote2-2.0.2’ in /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/applications/misc/nixnote2/default.nix:31 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/rn5diyhizc9kglyhzh6n9bndr695m1rg-nixnote2-2.0.2
shrinking /nix/store/rn5diyhizc9kglyhzh6n9bndr695m1rg-nixnote2-2.0.2/bin/nixnote2
strip is /nix/store/lvx1acn1ig1j2km8jds5x3ggh3f2wa8v-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/rn5diyhizc9kglyhzh6n9bndr695m1rg-nixnote2-2.0.2/bin
patching script interpreter paths in /nix/store/rn5diyhizc9kglyhzh6n9bndr695m1rg-nixnote2-2.0.2
checking for references to /build in /nix/store/rn5diyhizc9kglyhzh6n9bndr695m1rg-nixnote2-2.0.2...
postPatchMkspecs
postPatchMkspecs
/nix/store/rn5diyhizc9kglyhzh6n9bndr695m1rg-nixnote2-2.0.2

@fpletz fpletz changed the title nixnote: init at 2.0.2 nixnote2: init at 2.0.2 Feb 23, 2018
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/6prwql0dqycd3sy9fbh5c66vwjqypxq1-nixnote2-2.0.2
shrinking /nix/store/6prwql0dqycd3sy9fbh5c66vwjqypxq1-nixnote2-2.0.2/bin/nixnote2
strip is /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/6prwql0dqycd3sy9fbh5c66vwjqypxq1-nixnote2-2.0.2/bin 
patching script interpreter paths in /nix/store/6prwql0dqycd3sy9fbh5c66vwjqypxq1-nixnote2-2.0.2
checking for references to /tmp/nix-build-nixnote2-2.0.2.drv-0 in /nix/store/6prwql0dqycd3sy9fbh5c66vwjqypxq1-nixnote2-2.0.2...
postPatchMkspecs
postPatchMkspecs
/nix/store/6prwql0dqycd3sy9fbh5c66vwjqypxq1-nixnote2-2.0.2

@fpletz fpletz merged commit 3f47f61 into NixOS:master Feb 23, 2018
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

5 participants