-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
pywal: init at 2.0.5 #38443
pywal: init at 2.0.5 #38443
Conversation
pkgs/misc/pywal/default.nix
Outdated
version = "2.0.4"; | ||
src = builtins.fetchTarball { | ||
url = "https://github.com/dylanaraps/pywal/archive/${version}.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.
Use fetchFromGitHub
here and add a checksum.
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 could also use fetchPypi
: https://pypi.org/project/pywal/.
pkgs/misc/pywal/default.nix
Outdated
postCheck = '' | ||
rm -r tmp | ||
''; | ||
propagatedBuildInputs = with pkgs; [ imagemagick feh ] ++ (with py; [ setuptools ]); |
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 also add meta
attributes.
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.
if the program uses imagemagick
or feh
executables, adding those to propagatedBuildInputs
will not work except inside a nix-shell
. Use makeWrapper
here instead to extend PATH
: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/build-managers/sbt-extras/default.nix#L29
pkgs/misc/pywal/default.nix
Outdated
let | ||
py = pkgs.python36Packages; | ||
in py.buildPythonPackage rec { | ||
name = "pywal"; |
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.
name = "pyval-${version}";
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.
pname = "pywal";
pkgs/misc/pywal/default.nix
Outdated
@@ -0,0 +1,18 @@ | |||
{ pkgs ? import <nixpkgs> {} }: |
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.
remove pkgs
here and add imagemagick
, feh
and python3Packages
explictly.
pkgs/misc/pywal/default.nix
Outdated
''; | ||
postCheck = '' | ||
rm -r tmp | ||
''; |
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.
Cleanup can be skipped here. Nix take care of this.
pkgs/misc/pywal/default.nix
Outdated
{ pkgs ? import <nixpkgs> {} }: | ||
let | ||
py = pkgs.python36Packages; | ||
in py.buildPythonPackage rec { |
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.
buildPythonApplication
pkgs/misc/pywal/default.nix
Outdated
py = pkgs.python36Packages; | ||
in py.buildPythonPackage rec { | ||
name = "pywal"; | ||
version = "2.0.4"; |
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.
Version 2.0.5 is now available.
pkgs/misc/pywal/default.nix
Outdated
version = "2.0.4"; | ||
src = builtins.fetchTarball { | ||
url = "https://github.com/dylanaraps/pywal/archive/${version}.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.
You could also use fetchPypi
: https://pypi.org/project/pywal/.
@dotlambda @Mic92 Addressed |
pkgs/misc/pywal/default.nix
Outdated
meta = { | ||
description = "Generate and change colorschemes on the fly. A 'wal' rewrite in Python 3."; | ||
license = stdenv.lib.licenses.mit; | ||
platforms = stdenv.lib.platforms.unix; |
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.
Do you want maintain this package?
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 can. How would I state that here?
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.
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.
Don't forget to add inherit (src.meta) homepage;
.
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.
@dotlambda done!
pkgs/misc/pywal/default.nix
Outdated
postCheck = '' | ||
rm -r tmp | ||
postFixup = '' | ||
wrapProgram $out/bin/wal --prefix PATH : ${stdenv.lib.makeBinPath [ imagemagick feh ]} |
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 use makeWrapperArgs
instead.
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.
what do you mean?
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.
https://github.com/NixOS/nixpkgs/search?q=makeWrapperArgs, i.e.
makeWrapperArgs = [ "--prefix PATH : ${stdenv.lib.makeBinPath [ imagemagick feh ]}" ];
Excuse my ignorance, but how do I use this? I've tried to install the package by adding it to my configuration file but it seems that it can't be found, I'm getting |
(cherry picked from commit ff5baea)
It was only available in unstable because it was merged after the last release. Here is the backport to 18.03: [detached HEAD b88d66c] pywal: init at 2.0.5 (#38443) Channel updates can be tracked here: https://howoldis.herokuapp.com/ |
Motivation for this change
I wanted nixos to be prettier
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)