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

notion: 3-2017050501 -> 3-2019050101 #77855

Merged
merged 2 commits into from Jan 22, 2020
Merged

notion: 3-2017050501 -> 3-2019050101 #77855

merged 2 commits into from Jan 22, 2020

Conversation

AndersonTorres
Copy link
Member

@AndersonTorres AndersonTorres commented Jan 17, 2020

Motivation for this change

Update package.

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.

meta = with stdenv.lib; {
description = "Tiling tabbed window manager, follow-on to the ion window manager";
homepage = "https://notionwm.net/";
license = licenses.notion_lgpl; # notion4 will be fully LGPL
Copy link
Member

Choose a reason for hiding this comment

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

This version of notion appears to be using the standard LGPL 2.1. Please change this accordingly and drop the custom one from licenses.nix.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

PRELOAD_MODULES=0

# Purity reasons
X11_PREFIX="/no-such-path"
Copy link
Member

Choose a reason for hiding this comment

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

Can these all not just be set buildFlags?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

buildInputs = [makeWrapper xlibsWrapper lua gettext mandoc which libXinerama libXrandr libX11 ] ++ stdenv.lib.optional enableXft libXft;
preConfigure = ''cp ${./system-local-nixos.mk} system-local.mk'';

buildFlags = [ "LUA_DIR=${lua}" "PREFIX=\${out}" ];
Copy link
Member

Choose a reason for hiding this comment

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

Set PREFIX in makeFlags since it’s shared between installFlags and buildFlags.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@raboof
Copy link
Member

raboof commented Jan 17, 2020

Upstream here ;) - thanks for looking into this!

Where did you hear about "3-20200107"? This version is not tagged upstream, and the commit packaged in this PR is the latest master. The next release from master is intended to become "Notion 4", as we have made some larger changes (https://notionwm.net/migration.html). Packaging the latest master under version '3' would be confusing.

This PR is related to #70610 - I guess we should compare these and merge once we release Notion 4?

@raboof
Copy link
Member

raboof commented Jan 17, 2020

Of course we would much welcome testing of this snapshot - as you can see at https://github.com/raboof/notion/projects/1 we're rather close to releasing Notion 4 (perhaps within the next 3 weeks?).

@AndersonTorres AndersonTorres changed the title notion: 3-2017050501 -> 3-20200107 notion: 3-2017050501 -> 2020-01-07 Jan 17, 2020
@AndersonTorres
Copy link
Member Author

AndersonTorres commented Jan 17, 2020

@raboof , many thanks to look at us at NixOS community! In behalf of all, welcome to our repo :)

Where did you hear about "3-20200107"?

I use a script called nix-prefetch-git (it can be installed via nix-env, as usual). When I run the script, this is the output:

{
  "url": "https://github.com/raboof/notion",
  "rev": "8d719dff20f2186a6e0c4e5cf5486da785857d5b",
  "date": "2020-01-07T19:40:19+01:00",
  "sha256": "1rlbhknjz4fx55lb4g7z746f32p4mxwzns244slggpr5ba51ivfg",
  "fetchSubmodules": false
}

By default it tries the master branch, showing the corresponding date.

I guess we should compare these and merge once we release Notion 4?

My PR is a cleanup. It will make the transition to Notion4 smoother.

license = licenses.notion_lgpl;
maintainers = with maintainers; [jfb];
};
version = "2020-01-07";
Copy link
Member

Choose a reason for hiding this comment

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

It seems kind of weird to update this package from a released upstream tag to a timestamped git snapshot of the next (as of yet unreleased) major version introducing significant changes (https://notionwm.net/migration.html).

Thanks for not using the same version format, that does make it less confusing.

I'm not opposed to it, but my impression was that Nix prefers packaging released tags.

Copy link
Member

Choose a reason for hiding this comment

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

Indeed, this package should be named “notion-unstable” and the version should be set to the commit date.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not opposed to it, but my impression was that Nix prefers packaging released tags.

Initially I think "well, maybe the master branch fixed the compilation issues", then I tried it before anything else.

buildFlags = [ "CC=cc" "LUA_DIR=${lua}" "X11_PREFIX=/no-such-path"
# A bug in the upstream prevents it to compile
# when PRELOAD_MODULES is 1.
"PRELOAD_MODULES=0" ];
Copy link
Member

Choose a reason for hiding this comment

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

I think this can be removed: PRELOAD_MODULES=0 is already the default.

Copy link
Member Author

Choose a reason for hiding this comment

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

Weirdly, I needed to explicitly set it as "0" or else the mysterious fontconfig DSO bug appeared.

@@ -20380,7 +20380,7 @@ in
geoip = geoipWithDatabase;
};

notion = callPackage ../applications/window-managers/notion { };
notion = callPackage ../applications/window-managers/notion { lua = lua5_3; };
Copy link
Member

Choose a reason for hiding this comment

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

Was this necessary? Notion should work fine with the current Nix default (5.2), I've been testing with that for months.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, it was a leftover of various tests.

@alyssais
Copy link
Member

Given that this is a release -> unreleased bump, I think it needs some justification beyond “this is a cleanup”. Is something broken with the current package? What’s stopping us from waiting until there’s a new release in a few weeks?

@tftio as a fellow maintainer of this package, what do you think?

@raboof
Copy link
Member

raboof commented Jan 17, 2020

many thanks to look at us at NixOS community! In behalf of all, welcome to our repo :)

Thanks! I've switched to NixOS myself a few months back and I'm quite happy with it, so I plan to stick around :). Great to see this interest in having Notion on NixOS up-to-date!

@AndersonTorres
Copy link
Member Author

AndersonTorres commented Jan 17, 2020

Is something broken with the current package? What’s stopping us from waiting until there’s a new release in a few weeks?

Well, it required a now useless patch, and also the PRELOAD_MODULES issue preventing its compilation.

@alyssais now I am using the tagged upstream. What do you think?

@AndersonTorres AndersonTorres changed the title notion: 3-2017050501 -> 2020-01-07 notion: 3-2017050501 -> 3-2019050101 Jan 18, 2020
@AndersonTorres
Copy link
Member Author

Well, I think it is all OK now.
If no one objects it, I will merge tomorrow.

@alyssais
Copy link
Member

alyssais commented Jan 20, 2020 via email

@AndersonTorres
Copy link
Member Author

Done!

@AndersonTorres AndersonTorres merged commit 45b4008 into NixOS:master Jan 22, 2020
@AndersonTorres AndersonTorres deleted the update/notion branch January 22, 2020 10:58
dtzWill pushed a commit to dtzWill/nixpkgs that referenced this pull request Jan 22, 2020
notion: 3-2017050501 -> 3-2019050101
(cherry picked from commit 45b4008)
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

3 participants