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
peaclock: init at 0.4.3 #101231
peaclock: init at 0.4.3 #101231
Conversation
cefffb8
to
be75ae6
Compare
I tried to get this to build on OS X (since the repository says MacOS is supported) using { stdenv, lib, fetchFromGitHub, cmake, pkgconfig, libpthreadstubs, icu }:
stdenv.mkDerivation rec {
pname = "peaclock";
version = "0.4.3";
src = fetchFromGitHub {
owner = "octobanana";
repo = pname;
rev = version;
sha256 = "1582vgslhpgbvcd7ipgf1d1razrvgpq1f93q069yr2bbk6xn8i16";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ libpthreadstubs icu ];
cmakeFlags = [ "-DCMAKEBUILD_TYPE=release" ] ++ lib.optional (stdenv.isDarwin)
"-DCMAKE_CXX_COMPILER=${stdenv.cc}/bin/c++";
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "A clock, timer, and stopwatch for the terminal.";
homepage = "https://octobanana.com/software/peaclock";
license = licenses.mit;
platforms = [ "x86_64-darwin" "x86_64-linux" "i686-linux" ];
maintainers = with maintainers; [ djanatyn ];
};
} + peaclock = callPackage ../applications/misc/peaclock {
+ stdenv = if stdenv.isDarwin then gcc8Stdenv else stdenv;
+ }; Build output:
|
I was able to build successfully on pinephone, so I added |
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.
hehe it is cute!
I was able to run on macos with these changes, and the LC_ALL=C workaround from octobanana/peaclock#16. It looks like gccStdenv is gcc 9, which has a fully functioning stdc++fs. Although clang 7 is supposed to work, so maybe that would be preferable?
I tried
No worries - your changes worked and I got peaclock running on my macbook 🎉 Thank you @r-burns! I was looking at If so, I think this is working on all platforms based on my testing. |
Now squash the 5 commits to 2 only (the one for the new package maintainer and the other for the package itself). |
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.
Added a few suggestions :)
Also, squash the commits. |
Co-authored-by: r-burns <52847440+r-burns@users.noreply.github.com>
96624a0
to
c84ddc7
Compare
Commits squashed, review comments resolved. Thanks for walking me through this, it's so exciting contributing to something I use everyday. |
LGTM, LGTBorg. |
Otherwise stdenv on darwin uses clang, and we had some trouble linking the c++17 filesystem stuff there. (Maybe it's just a flag that's missing, but I haven't figured it out yet.) Similar errors were reported for a different nix package, and they resolved using `gccStdenv` too: NixOS/nixpkgs#101231
Motivation for this change
I wanted to use this clock in my terminal. It's cute!
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)