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

meh: init at 0.3 #24027

Merged
merged 1 commit into from Mar 19, 2017
Merged

meh: init at 0.3 #24027

merged 1 commit into from Mar 19, 2017

Conversation

neeasade
Copy link
Member

Motivation for this change

Add a package.

First time, read contributing and tested with nox-review, useSandbox, and resulting binaries.

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
    • Linux
  • 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.

name = "meh-0.3";

src = fetchFromGitHub {
owner = "jhawthorn";
Copy link
Contributor

Choose a reason for hiding this comment

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

Indentation is inconsistent.

src = fetchFromGitHub {
owner = "jhawthorn";
repo = "meh";
rev = "4ab1c75f97cb70543db388b3ed99bcfb7e94c758";
Copy link
Contributor

Choose a reason for hiding this comment

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

You can probably do rev = "v0.3" here. For convenience, consider factoring out a dedicated version attribute, to be reused in name and rev.


outputs = [ "out" "doc" ];

buildInputs = [ libXext libX11 libjpeg libpng giflib];
Copy link
Contributor

Choose a reason for hiding this comment

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

Inconsistent whitespace.

@neeasade
Copy link
Member Author

@joachifm thanks for reviewing -- I was taking a look at this and actually realized that 0.3 is from 2010 while the latest rev has had 25 commits since then -- I would add a default @ v0.3 and an unstable.nix except v0.3 doesn't compile (appears change in giflib function since that time) -- advice? maybe keep as fetchFromGitHub and use rev as version, default.nix following latest instead of release?

@joachifm
Copy link
Contributor

Package the version that works, I guess, but only one version please, unless there's a compelling reason to have more :) Beware that revisions are unsuitable as version strings, however. See https://github.com/NixOS/nixpkgs/blob/master/doc/coding-conventions.xml#L256

@neeasade
Copy link
Member Author

amended based on feedback

description = "A minimal image viewer using raw XLib";
homepage = http://www.johnhawthorn.com/meh/;
license = stdenv.lib.licenses.mit;
platforms = with stdenv.lib.platforms; unix;
Copy link
Member

Choose a reason for hiding this comment

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

should this work on other platforms?

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, nope. will amend and repush

Copy link
Member Author

Choose a reason for hiding this comment

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

confirming -- if only linus appropriate edit is?:
platforms = with stdenv.lib.platforms; linux;

Copy link
Member

Choose a reason for hiding this comment

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

yep or platforms = stdenv.lib.platforms.linux;

Copy link
Member

Choose a reason for hiding this comment

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

it's either with foo; bar or foo.bar, you accidentally left the with in there

@LnL7
Copy link
Member

LnL7 commented Mar 18, 2017

I get this on darwin

clang -O3 -DNDEBUG -MMD -MP -MT "src/gif.d" -c -o src/gif.o src/gif.c
clang -O3 -DNDEBUG -MMD -MP -MT "src/netpbm.d" -c -o src/netpbm.o src/netpbm.c
In file included from src/netpbm.c:6:
src/meh.h:50:15: error: unknown type name 'fd_set'
int setup_fds(fd_set *fds);
              ^
src/meh.h:51:17: error: unknown type name 'fd_set'
int process_fds(fd_set *fds);
                ^
2 errors generated.
make: *** [Makefile:34: src/netpbm.o] Error 1

@LnL7 LnL7 merged commit 0f4d515 into NixOS:master Mar 19, 2017
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