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
dduper: init at 0.04 #110393
dduper: init at 0.04 #110393
Conversation
|
||
let | ||
our-btrfs-progs = btrfs-progs.override { | ||
patches = [ patch ]; |
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.
Can you overwrite the package instead of adding an optional input?
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.
Isn't that dirtier?
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.
Having to many options which are not strictly required make the package more complex. I think overwrite is a good option here.
|
||
phases = [ "unpackPhase" "installPhase" ]; |
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.
phases = [ "unpackPhase" "installPhase" ]; |
Please disable the phases not needed.
pythonPath = [ python3Packages.python | ||
python3Packages.numpy | ||
python3Packages.ptable ]; |
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.
pythonPath = [ python3Packages.python | |
python3Packages.numpy | |
python3Packages.ptable ]; | |
pythonPath = with python3Packages; [ | |
python | |
numpy | |
ptable | |
]; |
python3Packages.ptable ]; | ||
|
||
prePatch = '' | ||
sed -i 's,/usr/sbin/btrfs\.static,'${our-btrfs-progs}/bin/btrfs, dduper |
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.
sed is not ideal because it silently fails.
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.
good point. What would you use?
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 either use substituteInPlace
(which prints a warning if nothing is replace) or use a full blown patch (which fails loudly to apply in case upstream changes the corresponding lines) like in https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/graphics/gimp/default.nix#L67-L70
meta = with stdenv.lib; { | ||
description = "Block-level out-of-band BTRFS dedupe tool"; | ||
homepage = "https://github.com/Lakshmipathi/dduper"; | ||
license = licenses.gpl2; |
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.
gpl2Only or gpl2Plus?
wrapPythonPrograms | ||
''; | ||
|
||
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.
meta = with stdenv.lib; { | |
meta = with lib; { |
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Fails to build because the patch does not apply. |
I'll wait for a dduper release. |
Motivation for this change
Add dduper package
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)