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

fakeroot: Add sed dependency. #52846

Merged
merged 1 commit into from Jan 4, 2019
Merged

fakeroot: Add sed dependency. #52846

merged 1 commit into from Jan 4, 2019

Conversation

clefru
Copy link
Contributor

@clefru clefru commented Dec 25, 2018

Motivation for this change

If fakeroot is used in a build script, fakeroot fails to do its job.

Things done

Hardcode dependency.
Run resulting "fakeroot"

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@@ -39,6 +39,9 @@ stdenv.mkDerivation rec {
done
'';

postInstall = ''
sed -i -e "s#for dir in \`echo \$PATHS | sed 's/:/ /g'\`#for dir in \`echo \$PATHS | ${gnused}/bin/sed 's/:/ /g'\`#" $out/bin/fakeroot
Copy link
Member

Choose a reason for hiding this comment

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

You could use a shorter.

sed -i -e "s#\<sed\>#${gnused}/bin/sed#g" $out/bin/fakeroot

Or you could even move it to postUnpack:

sed -i "s@sed@$(type -p sed)@g" ${name}/scripts/fakeroot.in

Copy link
Member

Choose a reason for hiding this comment

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

@clefru ping

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I adopted the last solution. fakeroot.in seems much easier to patch, thanks for the suggestion.

Also I merged it with the @getopt@ patching, which had a weird no-op-ish for loop around it, which I removed.

@rasendubi
Copy link
Member

@GrahamcOfBorg build autofs5 fakeroot hylafaxplus sssd

@rasendubi rasendubi merged commit 125befe into NixOS:master Jan 4, 2019
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

3 participants