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
pythonPackages.iterfzf: init at 0.5.0.20.0 #94661
Conversation
propagatedBuildInputs = [ | ||
fzf | ||
]; |
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 will propagate the fzf command to the environment which should be avoided. Patching should be used instead
propagatedBuildInputs = [ | |
fzf | |
]; | |
prePatch = '' | |
substituteInPlace iterfzf/__init__.py \ | |
--replace "EXECUTABLE_NAME = 'fzf.exe' if sys.platform == 'win32' else 'fzf'" \ | |
"EXECUTABLE_NAME = 'fzf.exe' if sys.platform == 'win32' else '${fzf}/bin/fzf' | |
''; |
pkgs/top-level/python-packages.nix
Outdated
@@ -7310,6 +7310,8 @@ in { | |||
|
|||
inflect = callPackage ../development/python-modules/inflect { }; | |||
|
|||
iterfzf = callPackage ../development/python-modules/iterfzf { }; |
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.
incase a fzf
package gets added to python scope
iterfzf = callPackage ../development/python-modules/iterfzf { }; | |
iterfzf = callPackage ../development/python-modules/iterfzf { | |
inherit (pkgs) fzf; | |
}; |
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.
To comply with CONTRIBUTING.md please have the commit message name be of the format
<pkg-name>: <subject-line>
for more examples, please look at https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md#submitting-changes
in your case, the commit message should be:
pythonPackages.iterfzf: init at 0.5.0.20.0"
please squash the fixup commits
Build on macos 10.14 fails:
edit: and it's quite right - there's a missing |
Go figure. Something easy enough to fix at least. First couple of weeks of this semester have been interesting. |
''; | ||
|
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 are no tests included. Please try to checkout from source and check if they have unit tests, and try to run them. Unit tests give a good indication that they package has a high degree of validity and correctness given the python package set.
If tests are not available, then please use pythonImportsCheck
to import the most important modules. This isn't as good as unit tests, but will usually give a good indication of run-time errors. Please see pythonImportsCheck documentation for more information.
----------------------------------------------------------------------
Ran 0 tests in 0.000s
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.
It looks like the sources have no tests. So, I'd say pythonImportsCheck
is the best we can do right now.
''; | ||
|
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.
It looks like the sources have no tests. So, I'd say pythonImportsCheck
is the best we can do right now.
pkgs/top-level/python-packages.nix
Outdated
iterfzf = callPackage ../development/python-modules/iterfzf { | ||
inherit (pkgs) fzf; | ||
}; |
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 omit the inherit
(it will be automatically passed):
iterfzf = callPackage ../development/python-modules/iterfzf { };
src = fetchFromGitHub { | ||
owner = "dahlia"; | ||
repo = pname; | ||
rev = version; | ||
sha256 = "0nrfq1zj4pwlgyd8ra5wl7skdbzvnxdh7wwhyh83y7yax8sp1xvj"; | ||
}; |
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'd recommend using the fetchPypi
function instead (this way you'll benefit from automatic updates):
src = fetchPypi {
inherit pname version;
sha256 = "0by5pk7w1j2xzhj4l0nw09sz9025pdskbf1b7k87kfkwgbc08vrb";
};
Looks like there is a merge conflict. Could you rebase? |
Is there anything else I need to do? |
}; | ||
|
||
} |
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.
}; | |
} | |
}; | |
} |
substituteInPlace iterfzf/__init__.py \ | ||
--replace "EXECUTABLE_NAME = 'fzf.exe' if sys.platform == 'win32' else 'fzf'" \ | ||
"EXECUTABLE_NAME = 'fzf.exe' if sys.platform == 'win32' else '${fzf}/bin/fzf'" |
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.
substituteInPlace iterfzf/__init__.py \ | |
--replace "EXECUTABLE_NAME = 'fzf.exe' if sys.platform == 'win32' else 'fzf'" \ | |
"EXECUTABLE_NAME = 'fzf.exe' if sys.platform == 'win32' else '${fzf}/bin/fzf'" | |
substituteInPlace iterfzf/__init__.py \ | |
--replace "EXECUTABLE_NAME = 'fzf.exe' if sys.platform == 'win32' else 'fzf'" \ | |
"EXECUTABLE_NAME = 'fzf.exe' if sys.platform == 'win32' else '${fzf}/bin/fzf'" |
I marked this as stale due to inactivity. → More info |
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.
closing due to inactivity. Feel free to re-open.
sha256 = "0by5pk7w1j2xzhj4l0nw09sz9025pdskbf1b7k87kfkwgbc08vrb"; | ||
}; | ||
|
||
prePatch = '' |
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.
prePatch = '' | |
postPatch = '' |
Motivation for this change
I'm slowly working on packaging the Remt tool for Remarkable Tablets. This package is required, and not packaged in NixOS.
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)