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
Write: init at 2.0.9 from Styluslabs #42574
Conversation
Write from Styluslabs (new package)
homepage = http://www.styluslabs.com/; | ||
description = "Write is a word processor for handwriting."; | ||
platforms = platforms.linux; | ||
maintainers = [ "m.scheuren@oyra.eu" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the current policy is that you should add a full entry for yourself in https://github.com/NixOS/nixpkgs/blob/master/maintainers/maintainer-list.nix and use the attr here.
$out/Write/Write | ||
''; | ||
|
||
meta = with stdenv.lib; { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mention the license, since Write is unfree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure here, would it be right to add "license = stdenv.lib.licenses.unfreeRedistributable;"?
@symphorien
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The license does not look like redistributable:
The LICENSEE may not reproduce or distribute the SOFTWARE PRODUCT.
so just unfree, I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" stdenv.lib.licenses.unfree, "unfree"
Unfree package that cannot be redistributed. You can build it yourself, but you cannot redistribute the output of the derivation. Thus it cannot be included in the Nixpkgs channel. "
So I can close the pull request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should read "it won't be build by hydra, but compiled locally". There are dozens of unfree derivations in nixpkgs: https://search.nix.gsc.io/?q=unfree&i=nope&files=pkgs&repos=
The formulation is arguably misleading, maybe the docs need to be made clearer.
}; | ||
|
||
src = fetchurl { | ||
url = "http://www.styluslabs.com/download/write-tgz"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct me if I am wrong, but the file pointed to by this url will probably change on the next update of Write, and will break the hash. If so, please replace it with an immutable url.
@@ -0,0 +1,53 @@ | |||
{ stdenv, lib, qt5, makeWrapper, fetchurl, makeDesktopItem }: | |||
stdenv.mkDerivation rec { | |||
name = "write_stylus"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name should follow the pattern "name-version".
homepage = http://www.styluslabs.com/; | ||
description = "Write is a word processor for handwriting."; | ||
platforms = platforms.linux; | ||
maintainers = [ oyren ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stdenv.lib.maintainers.oyren
, see the OfBorg error:
while evaluating the attribute 'maintainers' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/eval-0-gleber.ewr1.nix.ci/pkgs/applications/graphics/write_stylus/default.nix:52:5:
undefined variable 'oyren' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/eval-0-gleber.ewr1.nix.ci/pkgs/applications/graphics/write_stylus/default.nix:52:21
sourceRoot = "."; | ||
unpackCmd = '' | ||
tar xfz "$src" | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sourceRoot
and unpackCmd
are probably unnecessary now that the url ends with .tar.gz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldn't build it without sourceRoot. So i just removed unpackCmd.
@@ -0,0 +1,54 @@ | |||
{ stdenv, lib, qt5, makeWrapper, fetchurl, makeDesktopItem }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should not add qt5 as an argument: see https://nixos.org/nixpkgs/manual/#ssec-qt-applications
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just followed this guide https://nixos.wiki/wiki/Packaging/Binaries
If i remove qt5, the package don't build, tried to fix it with "qt5.callPackage" but than i get undefined variable qt5 or undefined variable qtbase.
edited: copy paste error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a specificity of qt: if you use libsForQt5.callPackage
instead of callPackage, you can add qtbase
and other attributes of qt5 directly as an argument. See as an example https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/digitalbitbox/default.nix#L13-L16 and https://github.com/NixOS/nixpkgs/blob/release-18.03/pkgs/top-level/all-packages.nix#L124
Thanks for the contribution; please squash this into one commit and use a commit message that is consistent with https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md for example |
}; | ||
sourceRoot = "."; | ||
|
||
buildPhase = ":"; # nothing to build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can probably use dontBuild = true;
here.
@ryantm I'm sorry, but I'm not that familiar with git. How can I squash this into one commit? I tried it with git rebase, without success. |
@oyren No problem, I'll try to help! Your main problem is you merged master into your development branch. Here's a rough script for how to fix it:
Please let me know if you get stuck! |
@ryantm But I got stucked :(.
Saved and closed the file and get the following error's: Maybe I should Close this PR and do a new one? |
@oyren Sure, there's no reason you can't just copy the files onto a fresh checkout of NixOS/master and make a new PR. |
There is the new PR #43044 |
Motivation for this change
I want to add Write from styluslabs.com as a package. This is my first commit, so please tell me if i am doing something wrong ;).
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)